diff options
Diffstat (limited to 'src/main/java')
631 files changed, 22653 insertions, 15844 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 55ee8f3c55..525da2dd08 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -1,5 +1,6 @@ package gregtech; +import com.google.common.base.Stopwatch; import cpw.mods.fml.common.*; import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.registry.EntityRegistry; @@ -11,6 +12,8 @@ import gregtech.api.enchants.Enchantment_Radioactivity; import gregtech.api.enums.*; import gregtech.api.interfaces.internal.IGT_Mod; import gregtech.api.objects.ItemData; +import gregtech.api.objects.ReverseShapedRecipe; +import gregtech.api.objects.ReverseShapelessRecipe; import gregtech.api.objects.XSTR; import gregtech.api.threads.GT_Runnable_MachineBlockUpdate; import gregtech.api.util.*; @@ -21,7 +24,6 @@ import gregtech.common.GT_RecipeAdder; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.armor.components.LoadArmorComponents; import gregtech.common.items.behaviors.Behaviour_DataOrb; import gregtech.common.misc.GT_Command; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator; @@ -188,16 +190,14 @@ public class GT_Mod implements IGT_Mod { GregTech_API.sUnification = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Unification.cfg"))); GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Other.cfg"))); GregTech_API.sOPStuff = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "OverpoweredStuff.cfg"))); - GregTech_API.sModularArmor = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "ModularArmor.cfg"))); GregTech_API.sClientDataFile = new GT_Config(new Configuration(new File(aEvent.getModConfigurationDirectory().getParentFile(), "GregTech.cfg"))); GregTech_API.mIC2Classic = Loader.isModLoaded("IC2-Classic-Spmod"); - //GregTech_API.mMagneticraft = Loader.isModLoaded("Magneticraft"); - //GregTech_API.mImmersiveEngineering = Loader.isModLoaded("ImmersiveEngineering"); GregTech_API.mGTPlusPlus = Loader.isModLoaded("miscutils"); GregTech_API.mTranslocator = Loader.isModLoaded("Translocator"); GregTech_API.mTConstruct = Loader.isModLoaded("TConstruct"); GregTech_API.mGalacticraft = Loader.isModLoaded("GalacticraftCore"); + GregTech_API.mAE2 = Loader.isModLoaded(MOD_ID_AE); GT_Log.out.println("GT_Mod: Are you there Translocator? " + GregTech_API.mTranslocator); GT_Log.out.println("GT_Mod: Are you there TConstruct? " + GregTech_API.mTConstruct); GT_Log.out.println("GT_Mod: Are you there GalacticraftCore? " + GregTech_API.mGalacticraft); @@ -264,6 +264,8 @@ public class GT_Mod implements IGT_Mod { GT_Values.D1 = tMainConfig.get(aTextGeneral, "Debug", false).getBoolean(false); GT_Values.D2 = tMainConfig.get(aTextGeneral, "Debug2", false).getBoolean(false); + GT_Values.hideAssLineRecipes = tMainConfig.get(aTextGeneral, "hide assline recipes", false).getBoolean(false); + GT_Values.updateFluidDisplayItems = tMainConfig.get(aTextGeneral, "update fluid display items", true).getBoolean(true); GT_Values.allow_broken_recipemap = tMainConfig.get(aTextGeneral, "debug allow broken recipemap", false).getBoolean(false); GT_Values.debugCleanroom = tMainConfig.get(aTextGeneral, "debugCleanroom", false).getBoolean(false); GT_Values.debugDriller = tMainConfig.get(aTextGeneral, "debugDriller", false).getBoolean(false); @@ -322,6 +324,9 @@ public class GT_Mod implements IGT_Mod { tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "B", tDye.mRGBa[2])))); } ); + gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true); + gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true); + gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3); gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16); gregtechproxy.mFlintChance = tMainConfig.get(aTextGeneral, "FlintAndSteelChance", 30).getInt(30); @@ -344,7 +349,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mSortToTheEnd = tMainConfig.get(aTextGeneral, "EnsureToBeLoadedLast", true).getBoolean(true); gregtechproxy.mDisableIC2Cables = tMainConfig.get(aTextGeneral, "DisableIC2Cables", true).getBoolean(true); gregtechproxy.mAchievements = tMainConfig.get(aTextGeneral, "EnableAchievements", true).getBoolean(true); - gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2")); + gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", GregTech_API.mAE2); gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true); gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true); gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true); @@ -362,7 +367,6 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", 1000000).getInt(1000000); gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000); gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); - gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true); gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); @@ -590,40 +594,7 @@ public class GT_Mod implements IGT_Mod { Materials.BandedIron.getDustSmall(1), Materials.Bauxite.getDustSmall(1), Materials.Pyrolusite.getDustTiny(2), Materials.Barite.getDustTiny(1), Materials.Chromite.getDustTiny(1), Materials.Ilmenite.getDustTiny(1), new int[]{10000, 10000, 10000, 10000, 7500, 5000}, 1000, 900); - /* - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanel", true)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC", 'C', OrePrefixes.circuit.get(Materials.Basic), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.plateAlloy.get(Materials.Carbon), 'S', ItemList.Circuit_Silicon_Wafer}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.wireGt04.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer2,'R', OrePrefixes.plate.get(Materials.GalliumArsenide)}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Master), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt16.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer3,'R', OrePrefixes.plate.get(Materials.IndiumGalliumPhosphide)}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanel8V", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSS", "STS", "SSS", 'S', ItemList.Cover_SolarPanel, 'T', OrePrefixes.circuit.get(Materials.Advanced)}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelLV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_8V, 'T', ItemList.Transformer_LV_ULV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelMV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LV, 'T', ItemList.Transformer_MV_LV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelHV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_HV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_MV, 'T', ItemList.Transformer_HV_MV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelEV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_EV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_HV, 'T', ItemList.Transformer_EV_HV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelIV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_IV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_EV, 'T', ItemList.Transformer_IV_EV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelLuV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LuV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_IV, 'T', ItemList.Transformer_LuV_IV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelZPM", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_ZPM.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LuV, 'T', ItemList.Transformer_ZPM_LuV}); - } - if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelUV", false)) { - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_UV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_ZPM, 'T', ItemList.Transformer_UV_ZPM}); - } - */ + double outputMultiplier = Math.min(GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "StoneDustOutputMultiplier", 0.6), 1.0); if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "StoneDustCentrifugation", false)) { int fullChance = (int) (10000 * outputMultiplier); @@ -750,6 +721,16 @@ public class GT_Mod implements IGT_Mod { } gregtechproxy.onPostLoad(); + + + for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { + if (i >= GregTech_API.METATILEENTITIES.length) + break; + if (GregTech_API.METATILEENTITIES[i] != null) { + GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); + } + } + if (gregtechproxy.mSortToTheEnd) { gregtechproxy.registerUnificationEntries(); } else { @@ -768,18 +749,16 @@ public class GT_Mod implements IGT_Mod { new GT_Worldgenloader().run(); new GT_CoverLoader().run(); - LoadArmorComponents.init(); - GT_RecipeRegistrator.registerUsagesForMaterials(null, false, new ItemStack(Blocks.planks, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.stone, 1), new ItemStack(Items.leather, 1)); GT_OreDictUnificator.addItemData(GT_ModHandler.getRecipeOutput(null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, null, null), new ItemData(Materials.Tin, 10886400L)); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, "tile.glowstone", false)) { GT_ModHandler.removeRecipe(new ItemStack(Items.glowstone_dust, 1), new ItemStack(Items.glowstone_dust, 1), null, new ItemStack(Items.glowstone_dust, 1), new ItemStack(Items.glowstone_dust, 1)); } - GT_ModHandler.removeRecipe(new ItemStack(Blocks.wooden_slab, 1, 0), new ItemStack(Blocks.wooden_slab, 1, 1), new ItemStack(Blocks.wooden_slab, 1, 2)); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.wooden_slab, 6, 0), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", 'W', new ItemStack(Blocks.planks, 1, 0)}); + GT_ModHandler.removeRecipeDelayed(new ItemStack(Blocks.wooden_slab, 1, 0), new ItemStack(Blocks.wooden_slab, 1, 1), new ItemStack(Blocks.wooden_slab, 1, 2)); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.wooden_slab, 6, 0), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"WWW", 'W', new ItemStack(Blocks.planks, 1, 0)}); - //Save a copy of these list before activateOreDictHandler(), then loop over them. + // Save a copy of these list before activateOreDictHandler(), then loop over them. Map<IRecipeInput, RecipeOutput> aMaceratorRecipeList = GT_ModHandler.getMaceratorRecipeList(); Map<IRecipeInput, RecipeOutput> aCompressorRecipeList = GT_ModHandler.getCompressorRecipeList(); Map<IRecipeInput, RecipeOutput> aExtractorRecipeList = GT_ModHandler.getExtractorRecipeList(); @@ -788,14 +767,18 @@ public class GT_Mod implements IGT_Mod { GT_Log.out.println("GT_Mod: Activating OreDictionary Handler, this can take some time, as it scans the whole OreDictionary"); GT_FML_LOGGER.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager."); - long ms = System.currentTimeMillis(); + + Stopwatch stopwatch = Stopwatch.createStarted(); gregtechproxy.activateOreDictHandler(); - GT_FML_LOGGER.info("Congratulations, you have been waiting long enough (" + (System.currentTimeMillis() - ms) / 1000 + "s / " + (System.currentTimeMillis() - ms) + "ms). Have a Cake."); + 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 Damagable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString()); - //GT_Log.out.println("GT_Mod: sRodMaterialList cycles: " + GT_RecipeRegistrator.sRodMaterialList_cycles); + Set<Materials> replaceVanillaItemsSet = gregtechproxy.mUseGreatlyShrukenReplacementList ? Arrays.stream(Materials.values()).filter(GT_RecipeRegistrator::hasVanillaRecipes).collect(Collectors.toSet()) : new HashSet<>(Arrays.asList(Materials.values())); + + stopwatch.reset(); + stopwatch.start(); GT_FML_LOGGER.info("Replacing Vanilla Materials in recipes, please wait."); ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", replaceVanillaItemsSet.size()); @@ -814,14 +797,26 @@ public class GT_Mod implements IGT_Mod { }); } ProgressManager.pop(progressBar); - GT_FML_LOGGER.info("Congratulations, you have been waiting long enough (" + (System.currentTimeMillis() - ms) / 1000 + "s / " + (System.currentTimeMillis() - ms) + "ms). Have a Cake."); + GT_FML_LOGGER.info("Replaced Vanilla Materials (" + stopwatch.stop() + "). Have a Cake."); + + + stopwatch.reset(); + stopwatch.start(); + // 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())); //Add default IC2 recipe to GT GT_ModHandler.addIC2RecipesToGT(aMaceratorRecipeList, GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true); GT_ModHandler.addIC2RecipesToGT(aCompressorRecipeList, GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true); GT_ModHandler.addIC2RecipesToGT(aExtractorRecipeList, GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true); GT_ModHandler.addIC2RecipesToGT(aOreWashingRecipeList, GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true); GT_ModHandler.addIC2RecipesToGT(aThermalCentrifugeRecipeList, GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, true, true, true); - + GT_FML_LOGGER.info("IC2 Removal (" + stopwatch.stop() + "). Have a Cake."); + + if (GT_Values.D1) { GT_ModHandler.sSingleNonBlockDamagableRecipeList.forEach(iRecipe -> GT_Log.out.println("=> " + iRecipe.getRecipeOutput().getDisplayName())); } @@ -847,63 +842,18 @@ public class GT_Mod implements IGT_Mod { GT_Forestry_Compat.transferCentrifugeRecipes(); GT_Forestry_Compat.transferSqueezerRecipes(); } - if (Loader.isModLoaded(MOD_ID_AE)) + if (GregTech_API.mAE2) GT_MetaTileEntity_DigitalChestBase.registerAEIntegration(); - String tName = ""; - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blastfurnace"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blockcutter"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "inductionFurnace"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "generator"), false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "windMill"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "waterMill"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "solarPanel"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "centrifuge"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electrolyzer"), false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "compressor"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electroFurnace"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "extractor"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "macerator"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "recycler"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "metalformer"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "orewashingplant"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "massFabricator"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "replicator"), true)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L)); - } + + + 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); + + if (gregtechproxy.mNerfedVanillaTools) { GT_Log.out.println("GT_Mod: Nerfing Vanilla Tool Durability"); Items.wooden_sword.setMaxDamage(12); @@ -937,9 +887,20 @@ public class GT_Mod implements IGT_Mod { Items.diamond_hoe.setMaxDamage(768); } new GT_ExtremeDieselFuelLoader().run(); + + + /* + * 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. + */ + + stopwatch.reset(); + stopwatch.start(); GT_Log.out.println("GT_Mod: Adding buffered Recipes."); GT_ModHandler.stopBufferingCraftingRecipes(); - + GT_FML_LOGGER.info("Executed delayed Crafting Recipes (" + stopwatch.stop() + "). Have a Cake."); + GT_Log.out.println("GT_Mod: Saving Lang File."); GT_LanguageManager.sEnglishFile.save(); GregTech_API.sPostloadFinished = true; @@ -1013,9 +974,13 @@ public class GT_Mod implements IGT_Mod { } addSolidFakeLargeBoilerFuels(); + identifyAnySteam(); achievements = new GT_Achievements(); + ReverseShapedRecipe.runReverseRecipes(); + ReverseShapelessRecipe.runReverseRecipes(); + GT_Recipe.GTppRecipeHelper = true; GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables."); GregTech_API.sBeforeGTPreload = null; @@ -1078,15 +1043,6 @@ public class GT_Mod implements IGT_Mod { public void onServerAboutToStart(FMLServerAboutToStartEvent aEvent) { gregtechproxy.onServerAboutToStart(); } -// public void onIDChangingEvent(FMLModIdMappingEvent aEvent) -// { -// GT_Utility.reInit(); -// GT_Recipe.reInit(); -// Map<GT_ItemStack, ?> tMap; -// for (Iterator i$ = GregTech_API.sItemStackMappings.iterator(); i$.hasNext(); ) { -// tMap = (Map)i$.next(); -// } -// } @Mod.EventHandler public void onServerStarting(FMLServerStartingEvent aEvent) { @@ -1358,4 +1314,14 @@ public class GT_Mod implements IGT_Mod { GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1)); } } -}
\ No newline at end of file + + private void identifyAnySteam() { + 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()); + } +} diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 932d267a34..ba7e3ab43e 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -17,6 +17,7 @@ import gregtech.api.objects.GT_Cover_Default; import gregtech.api.objects.GT_Cover_None; import gregtech.api.objects.GT_HashSet; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.threads.GT_Runnable_Cable_Update; import gregtech.api.threads.GT_Runnable_MachineBlockUpdate; import gregtech.api.util.*; import gregtech.api.world.GT_Worldgen; @@ -25,6 +26,7 @@ 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.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; @@ -89,8 +91,16 @@ public class GregTech_API { * 9728 - 10239 are reserved for 28Smiles. * 10240 - 10751 are reserved for VirMan. * 10752 - 11263 are reserved for Briareos81. - * 11264 - 12000 are reserved for the next one who asks me. - * 9728 - 32766 are currently free. + * 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 - 14999 are currently free. + * 15000 - 16999 are reserved for TecTech. + * 17000 - 29999 are currently free. + * 30000 - 31999 are reserved for Alkalus. + * 32001 - 32766 are currently free. * <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 @@ -212,7 +222,6 @@ public class GregTech_API { sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, - sModularArmor = null, sMaterialProperties = null, sMaterialComponents = null, sUnification = null, @@ -257,6 +266,8 @@ public class GregTech_API { sBlockCasings5, sBlockCasings6, sBlockCasings8; + public static Block + sBlockLongDistancePipes; /** * Getting assigned by the Config */ @@ -285,7 +296,8 @@ public class GregTech_API { mGTPlusPlus = false, mTranslocator = false, mTConstruct = false, - mGalacticraft = false; + mGalacticraft = false, + mAE2 = false; public static int mEUtoRF = 360, mRFtoEU = 20; @@ -389,13 +401,22 @@ public class GregTech_API { * @param aZ is the Z-Coord of the update causing Block */ public static boolean causeMachineUpdate(World aWorld, int aX, int aY, int aZ) { - if (aWorld != null && !aWorld.isRemote) { //World might be null during Worldgen - GT_Runnable_MachineBlockUpdate.setMachineUpdateValues(aWorld, aX, aY, aZ); + if (aWorld != null && !aWorld.isRemote) { // World might be null during Worldgen + GT_Runnable_MachineBlockUpdate.setMachineUpdateValues(aWorld, new ChunkCoordinates(aX, aY, aZ)); return true; } return false; } + public static boolean causeCableUpdate(World aWorld, int aX, int aY, int aZ) { + if (aWorld != null && !aWorld.isRemote) { // World might be null during Worldgen + GT_Runnable_Cable_Update.setCableUpdateValues(aWorld, new ChunkCoordinates(aX, aY, aZ)); + return true; + } + return false; + + } + /** * Adds a Multi-Machine Block, like my Machine Casings for example. * You should call @causeMachineUpdate in @Block.breakBlock and in @Block.onBlockAdded of your registered Block. @@ -728,4 +749,23 @@ public class GregTech_API { sToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool))); return true; } + + /** + * Sets the {@link IIconRegister} for Block Icons + * @param aIconRegister The {@link IIconRegister} Icon Register + */ + @SideOnly(Side.CLIENT) + public static void setBlockIconRegister(IIconRegister aIconRegister) { + sBlockIcons = aIconRegister; + }; + + /** + * Sets the {@link IIconRegister} for Items Icons + * @param aIconRegister The {@link IIconRegister} Icon Register + */ + @SideOnly(Side.CLIENT) + public static void setItemIconRegister(IIconRegister aIconRegister) { + GregTech_API.sItemIcons = aIconRegister; + } + } diff --git a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java index bb5ff01b8f..fd13b9cfee 100644 --- a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java +++ b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java @@ -83,4 +83,4 @@ public class GT_DamageSources { return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " exploded"); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java index 102d78d430..9a9521d130 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java @@ -55,4 +55,4 @@ public class Enchantment_EnderDamage extends EnchantmentDamage { public String getName() { return "enchantment.damage.endermen"; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java b/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java index bf4cd1347c..cc09b5768e 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_Radioactivity.java @@ -58,4 +58,4 @@ public class Enchantment_Radioactivity extends EnchantmentDamage { public String getName() { return "enchantment.damage.radioactivity"; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index 1919441539..513872ce38 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -63,4 +63,4 @@ public enum ConfigCategories { hammerquintupleplate, scoop; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index c8aec75f9e..418cea65ff 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -107,4 +107,4 @@ public enum Dyes implements IColorModulationContainer { public short[] getRGBA() { return mRGBa; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/Element.java b/src/main/java/gregtech/api/enums/Element.java index cfbbeaa528..343f8ec0ed 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -241,7 +241,7 @@ public enum Element { $Np(-93, -144, 0, -1, null, "Anti-Neptunium", false), $Pu(-94, -152, 0, -1, null, "Anti-Plutonium", false), $Pu_241(-94, -149, 0, -1, null, "Anti-Plutonium-241", true), - $Am(-95, -150, 0, -1, null, "Anti-Americum", false), + $Am(-95, -150, 0, -1, null, "Anti-Americium", false), $Cm(-96, -153, 0, -1, null, "Anti-Curium", false), $Bk(-97, -152, 0, -1, null, "Anti-Berkelium", false), $Cf(-98, -153, 0, -1, null, "Anti-Californium", false), diff --git a/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java b/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java index d8d254ce55..517b9beac8 100644 --- a/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java +++ b/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java @@ -60,4 +60,4 @@ public class GTNH_ExtraMaterials implements IMaterialHandler { public void onComponentIteration(Materials aMaterial) { } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 66b2e8a08f..7152663c42 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.internal.IGT_Mod; import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.net.IGT_NetworkHandler; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; @@ -126,6 +127,16 @@ public class GT_Values { "Ultimate High Voltage", "Ultimate Extreme Voltage", "Ultimate Insane Voltage", "Ultimate Mega Voltage", "Ultimate Extended Mega Voltage", "Overpowered Voltage", "Maximum Voltage"}; + + public static final String[] TIER_COLORS = + new String[]{ + EnumChatFormatting.RED.toString(), EnumChatFormatting.GRAY.toString(), EnumChatFormatting.AQUA.toString(), + EnumChatFormatting.GOLD.toString(), EnumChatFormatting.DARK_PURPLE.toString(), EnumChatFormatting.DARK_BLUE.toString(), + EnumChatFormatting.LIGHT_PURPLE.toString(), EnumChatFormatting.WHITE.toString(), EnumChatFormatting.DARK_AQUA.toString(), + EnumChatFormatting.DARK_RED.toString(), EnumChatFormatting.GREEN.toString(), EnumChatFormatting.DARK_GREEN.toString(), + EnumChatFormatting.YELLOW.toString(), EnumChatFormatting.UNDERLINE.toString(), EnumChatFormatting.BOLD.toString(), + EnumChatFormatting.OBFUSCATED.toString()}; + /** * 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 */ @@ -287,4 +298,8 @@ public class GT_Values { public static boolean debugChunkloaders = false; public static boolean cls_enabled; + + public static boolean hideAssLineRecipes = false; + public static boolean updateFluidDisplayItems = true; + public static final int STEAM_PER_WATER = 160; } diff --git a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java new file mode 100644 index 0000000000..d4446e31d0 --- /dev/null +++ b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java @@ -0,0 +1,69 @@ +package gregtech.api.enums; + +import net.minecraft.util.EnumChatFormatting; + +public enum HeatingCoilLevel { + None, // 0 + ULV, //Not implemented 901 + LV, //Cupronickel 1801 + MV, //KANTHAL 2701 + HV, //NICHROME 3601 + EV, //TUNGSTENSTEEL 4501 + IV, //HSSG 5401 + LuV, //HSSS 6301 + ZPM, //NAQUADAH 7201 + UV, //NAQUADAHALLOY 8101 + UHV, //TRINIUM 9001 + UEV, //ELECTRUMFLUX 9901 + UIV, //AWAKENEDDRACONIUM 10801 + //Not Implemented yet + UMV, + UXV, + OpV, + MAX, + ; + + /** + * @return the Coils Tier Name + */ + public String getTierName() { + if (this.ordinal() < 1 || (this.ordinal()-1) >= GT_Values.VN.length) + return "ERROR!"; + return GT_Values.TIER_COLORS[this.ordinal() - 1] + GT_Values.VOLTAGE_NAMES[this.ordinal() - 1] + EnumChatFormatting.RESET; + } + + /** + * @return the coil heat, used for recipes in the Electronic Blast Furnace for example + */ + public long getHeat() { + return this == None ? 0 : 1L + (900L * this.ordinal()); + } + + /** + * @return the coil tier, used for discount in the Pyrolyse Ofen for example + */ + public byte getTier() { + return (byte) (this.ordinal() - 2); + } + + /** + * @return the coil Level, used for Parallels in the Multi Furnace for example + */ + public byte getLevel() { + return (byte) (1 << Math.min(Math.max(0, this.ordinal() - 2), 4)); + } + + /** + * @return the coil Discount, used for discount in the Multi Furnace for example + */ + public int getCostDiscount() { + return 1 << Math.max(0, this.ordinal() - 5); + } + + public static HeatingCoilLevel getFromTier(byte tier){ + if (tier < 0 || tier > HeatingCoilLevel.values().length -1) + return HeatingCoilLevel.None; + + return HeatingCoilLevel.values()[tier+2]; + } +} diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 8830ab50a5..64bda0f170 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1,6 +1,7 @@ package gregtech.api.enums; import gregtech.api.interfaces.IItemContainer; +import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -9,6 +10,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; +import java.util.Locale; + +import static gregtech.api.enums.GT_Values.NI; import static gregtech.api.enums.GT_Values.W; /** @@ -401,6 +405,12 @@ public enum ItemList implements IItemContainer { Electric_Pump_UHV, Electric_Pump_UEV, + Steam_Valve_LV, + Steam_Valve_MV, + Steam_Valve_HV, + Steam_Valve_EV, + Steam_Valve_IV, + Conveyor_Module_LV, Conveyor_Module_MV, Conveyor_Module_HV, @@ -1215,9 +1225,6 @@ public enum ItemList implements IItemContainer { Machine_HV_Massfab, Machine_EV_Massfab, Machine_IV_Massfab, - Machine_LuV_Massfab, - Machine_ZPM_Massfab, - Machine_UV_Massfab, Machine_LV_Amplifab, Machine_MV_Amplifab, @@ -1395,6 +1402,14 @@ public enum ItemList implements IItemContainer { Super_Chest_HV, Super_Chest_EV, Super_Chest_IV, + + Long_Distance_Pipeline_Fluid, + Long_Distance_Pipeline_Item, + + Long_Distance_Pipeline_Fluid_Pipe, + Long_Distance_Pipeline_Item_Pipe, + + Hatch_Output_Bus_ME, NULL, Cover_RedstoneTransmitterExternal, @@ -1434,7 +1449,9 @@ public enum ItemList implements IItemContainer { Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_HSSG, + Casing_Coil_HSSS, Casing_Coil_Naquadah, + Casing_Coil_Trinium, Casing_Coil_NaquadahAlloy, Casing_Coil_ElectrumFlux, Casing_Coil_AwakenedDraconium, @@ -1542,20 +1559,6 @@ public enum ItemList implements IItemContainer { Moxcell_2, Moxcell_4, - ModularBasicHelmet, - ModularBasicChestplate, - ModularBasicLeggings, - ModularBasicBoots, - - ModularElectric1Helmet, - ModularElectric1Chestplate, - ModularElectric1Leggings, - ModularElectric1Boots, - - ModularElectric2Helmet, - ModularElectric2Chestplate, - ModularElectric2Leggings, - ModularElectric2Boots, Block_Powderbarrel, GelledToluene, @@ -1568,6 +1571,8 @@ public enum ItemList implements IItemContainer { FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, + ItemFilter_Export, + ItemFilter_Import, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, @@ -2010,8 +2015,24 @@ public enum ItemList implements IItemContainer { public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { ItemStack rStack = get(1, aReplacements); if (GT_Utility.isStackInvalid(rStack)) - return null; - rStack.setStackDisplayName(aDisplayName); + return NI; + + // CamelCase alphanumeric words from aDisplayName + StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder(); + final String[] tDisplayNameWords = aDisplayName.split("\\W"); + for (String tWord : tDisplayNameWords){ + if (tWord.length() > 0) tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); + if (tWord.length() > 1) tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); + } + if (tCamelCasedDisplayNameBuilder.length() == 0) { + // CamelCased DisplayName is empty, so use hash of aDisplayName + tCamelCasedDisplayNameBuilder.append(((Long) (long)aDisplayName.hashCode()).toString()); + } + + // Construct a translation key from UnlocalizedName and CamelCased DisplayName + final String tKey = rStack.getUnlocalizedName() + ".with." + tCamelCasedDisplayNameBuilder.toString() + ".name"; + + rStack.setStackDisplayName(GT_LanguageManager.addStringLocalization(tKey, aDisplayName)); return GT_Utility.copyAmount(aAmount, rStack); } diff --git a/src/main/java/gregtech/api/enums/MaterialBuilder.java b/src/main/java/gregtech/api/enums/MaterialBuilder.java index 7df2e4bc39..94d0db1e35 100644 --- a/src/main/java/gregtech/api/enums/MaterialBuilder.java +++ b/src/main/java/gregtech/api/enums/MaterialBuilder.java @@ -258,4 +258,4 @@ public class MaterialBuilder { return this; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index b46d26e02d..905e08a434 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -53,7 +53,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Bismuth = new Materials( 90, TextureSet.SET_METALLIC , 6.0F, 64, 1, 1|2 |8 |32|64|128 , 100, 160, 160, 0, "Bismuth" , "Bismuth" , 0, 0, 544, 0, false, false, 2, 1, 1, Dyes.dyeCyan , Element.Bi , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); public static Materials Boron = new Materials( 9, TextureSet.SET_DULL , 1.0F, 0, 2, 1|32 , 210, 250, 210, 0, "Boron" , "Boron" , 0, 0, 2349, 0, false, false, 1, 1, 1, Dyes.dyeWhite , Element.B , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 3))); public static Materials Caesium = new Materials( 62, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Caesium" , "Caesium" , 0, 0, 301, 0, false, false, 4, 1, 1, Dyes._NULL , Element.Cs , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Calcium = new Materials( 26, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 255, 245, 245, 0, "Calcium" , "Calcium" , 0, 0, 1115, 0, false, false, 4, 1, 1, Dyes.dyePink , Element.Ca , Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 1), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); + public static Materials Calcium = new Materials( 26, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 255, 245, 245, 0, "Calcium" , "Calcium" , 0, 0, 1115, 1115, true, false, 4, 1, 1, Dyes.dyePink , Element.Ca , Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 1), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); public static Materials Carbon = new Materials( 10, TextureSet.SET_DULL , 1.0F, 64, 2, 1|2 |16|32|64|128 , 20, 20, 20, 0, "Carbon" , "Carbon" , 0, 0, 3800, 0, false, false, 2, 1, 1, Dyes.dyeBlack , Element.C , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); public static Materials Cadmium = new Materials( 55, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 |8 |32 , 50, 50, 60, 0, "Cadmium" , "Cadmium" , 0, 0, 594, 0, false, false, 3, 1, 1, Dyes.dyeGray , Element.Cd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))); public static Materials Cerium = new Materials( 65, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Cerium" , "Cerium" , 0, 0, 1068, 1068, true, false, 4, 1, 1, Dyes._NULL , Element.Ce , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); @@ -234,7 +234,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials FierySteel = new Materials( 346, TextureSet.SET_FIERY , 8.0F, 256, 3, 1|2 |64|128 , 64, 0, 0, 0, "FierySteel" , "Fiery Steel" , 5, 2048, 1811, 1800, true, false, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 3), new TC_AspectStack(TC_Aspects.CORPUS, 3))).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials Firestone = new Materials( 347, TextureSet.SET_QUARTZ , 6.0F, 1280, 3, 1 |4|8 |64 , 200, 20, 0, 0, "Firestone" , "Firestone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed ); public static Materials Fluorite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Fluorite" , "Fluorite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen ); - public static Materials FoolsRuby = new Materials( 512, TextureSet.SET_RUBY , 1.0F, 0, 2, 1 |4|8 , 255, 100, 100, 127, "FoolsRuby" , "Ruby" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 2))); + public static Materials FoolsRuby = new Materials( 512, TextureSet.SET_RUBY , 1.0F, 0, 2, 1 |4|8 , 255, 100, 100, 127, "FoolsRuby" , "Ruby" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 2))); public static Materials Force = new Materials( 521, TextureSet.SET_DIAMOND , 10.0F, 128, 3, 1|2|4|8 |64|128 , 255, 255, 0, 0, "Force" , "Force" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 5))); public static Materials Forcicium = new Materials( 518, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcicium" , "Forcicium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); public static Materials Forcillium = new Materials( 519, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcillium" , "Forcillium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); @@ -508,15 +508,15 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials EnrichedNaquadria = new MaterialBuilder(601, TextureSet.SET_FLUID , "Enriched Naquadria").setName("EnrichedNaquadria").addCell().addFluid().setRGB(52, 52, 52).setColor(Dyes.dyeBlack).constructMaterial(); public static Materials ReinforceGlass = new MaterialBuilder(602, TextureSet.SET_FLUID , "Molten Reinforced Glass").setName("ReinforcedGlass").addCell().addFluid().setRGB(192, 245, 254).setColor(Dyes.dyeWhite).setLiquidTemperature(2000).constructMaterial(); - public static Materials BioMediumRaw = new MaterialBuilder(603, TextureSet.SET_FLUID , "Raw Bio Medium").setName("BioMediumRaw").addCell().addFluid().setRGB(97, 147, 46).setColor(Dyes.dyeLime).constructMaterial(); - public static Materials BioMediumSterilized = new MaterialBuilder(604, TextureSet.SET_FLUID , "Sterilized Bio Medium").setName("BiohMediumSterilized").addCell().addFluid().setRGB(162, 253, 53).setColor(Dyes.dyeLime).constructMaterial(); + public static Materials BioMediumRaw = new MaterialBuilder(603, TextureSet.SET_FLUID , "Raw Bio Catalyst Medium").setName("BioMediumRaw").addCell().addFluid().setRGB(97, 147, 46).setColor(Dyes.dyeLime).constructMaterial(); + public static Materials BioMediumSterilized = new MaterialBuilder(604, TextureSet.SET_FLUID , "Sterilized Bio Catalyst Medium").setName("BiohMediumSterilized").addCell().addFluid().setRGB(162, 253, 53).setColor(Dyes.dyeLime).constructMaterial(); public static Materials Chlorobenzene = new MaterialBuilder(605, TextureSet.SET_FLUID , "Chlorobenzene").addCell().addFluid().setRGB(0, 50, 65).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); public static Materials DilutedHydrochloricAcid = new MaterialBuilder(606, TextureSet.SET_FLUID , "Diluted Hydrochloric Acid").setName("DilutedHydrochloricAcid_GT5U").addCell().addFluid().setRGB(153, 167, 163).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)).constructMaterial(); public static Materials Pyrochlore = new MaterialBuilder(607, TextureSet.SET_METALLIC , "Pyrochlore").addDustItems().addOreItems().setRGB(43, 17, 0).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Calcium, 2), new MaterialStack(Niobium, 2), new MaterialStack(Oxygen, 7)).addElectrolyzerRecipe().constructMaterial(); - public static Materials GrowthMediumRaw = new MaterialBuilder(608, TextureSet.SET_FLUID , "Raw Growth Medium").setName("GrowthMediumRaw").addCell().addFluid().setRGB(211, 141, 95).setColor(Dyes.dyeOrange).constructMaterial(); - public static Materials GrowthMediumSterilized = new MaterialBuilder(609, TextureSet.SET_FLUID , "Sterilized Growth Medium").setName("GrowthMediumSterilized").addCell().addFluid().setRGB(222, 170, 135).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials GrowthMediumRaw = new MaterialBuilder(608, TextureSet.SET_FLUID , "Raw Growth Catalyst Medium").setName("GrowthMediumRaw").addCell().addFluid().setRGB(211, 141, 95).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials GrowthMediumSterilized = new MaterialBuilder(609, TextureSet.SET_FLUID , "Growth Catalyst Medium").setName("GrowthMediumSterilized").addCell().addFluid().setRGB(222, 170, 135).setColor(Dyes.dyeOrange).constructMaterial(); public static Materials FerriteMixture = new MaterialBuilder(612, TextureSet.SET_METALLIC , "Ferrite Mixture").addDustItems().setRGB(180, 180, 180).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Nickel, 1), new MaterialStack(Zinc, 1), new MaterialStack(Iron, 4)).constructMaterial(); public static Materials NickelZincFerrite = new MaterialBuilder(613, TextureSet.SET_ROUGH , "Nickel-Zinc Ferrite").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(32).setRGB(60, 60, 60).setColor(Dyes.dyeBlack).setBlastFurnaceRequired(true).setBlastFurnaceTemp(1500).setMaterialList(new MaterialStack(Nickel, 1), new MaterialStack(Zinc, 1), new MaterialStack(Iron, 4), new MaterialStack(Oxygen, 8)).constructMaterial(); @@ -649,7 +649,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Cryotheum = new Materials( 898, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 , 0, 148, 203, 0, "Cryotheum" , "Cryotheum" , 2, 62, -1, 0, false, false, 2, 3, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Saltpeter, 1), new MaterialStack(Redstone, 1), new MaterialStack(Snow, 1), new MaterialStack(Blizz, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1), new TC_AspectStack(TC_Aspects.GELUM, 1))); public static Materials HydratedCoal = new Materials( 818, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 70, 70, 100, 0, "HydratedCoal" , "Hydrated Coal" , 0, 0, -1, 0, false, false, 1, 9, 8, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Coal, 8), new MaterialStack(Water, 1))); public static Materials Apatite = new Materials( 530, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 200, 200, 255, 0, "Apatite" , "Apatite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); - public static Materials Alumite = new Materials( 400, TextureSet.SET_METALLIC , 5.0F, 768, 2, 1|2 |128 , 255, 105, 180, 0, "Alumite" , "Alumite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Steel, 2), new MaterialStack(Obsidian, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); + public static Materials Alumite = new Materials( 400, TextureSet.SET_METALLIC , 5.0F, 768, 2, 1|2 |64|128 , 255, 105, 180, 0, "Alumite" , "Alumite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Steel, 2), new MaterialStack(Obsidian, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); public static Materials Manyullyn = new Materials( 386, TextureSet.SET_SHINY , 25.0F, 2048, 5, 1|2 |8 |64|128 , 154, 76, 185, 0, "Manyullyn" , "Manyullyn" , 0, 0, 3600, 3600, true, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Ardite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials Steeleaf = new Materials( 339, TextureSet.SET_LEAF , 8.0F, 768, 3, 1|2 |64|128 , 50, 127, 50, 0, "Steeleaf" , "Steeleaf" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 2), new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); public static Materials Knightmetal = new Materials( 362, TextureSet.SET_METALLIC , 8.0F, 1024, 3, 1|2 |64|128 , 210, 240, 200, 0, "Knightmetal" , "Knightmetal" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))); @@ -753,7 +753,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Galgadorian = new Materials( 384, TextureSet.SET_METALLIC , 16.0F, 3600, 3, 1|2 |64|128 , 154, 105, 119, 0, "Galgadorian" , "Galgadorian" , 0, 0, 3000, 3000, true, false, 1, 1, 1, Dyes.dyePink ).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials EnhancedGalgadorian = new Materials( 385, TextureSet.SET_METALLIC , 32.0F, 7200, 5, 1|2| 64|128 , 152, 93, 133, 0, "EnhancedGalgadorian" , "Enhanced Galgadorian" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyePink ).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials BloodInfusedIron = new Materials( 977, TextureSet.SET_METALLIC , 10.0F, 384, 2, 1|2 |64|128 , 69, 9, 10, 0, "BloodInfusedIron" , "Blood Infused Iron" , 0, 0, 2400, 0, false, false, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Shadow = new Materials( 368, TextureSet.SET_METALLIC , 32.0F, 8192, 4, 1|2 |8 |64|128 , 16, 3, 66, 0, "Shadow" , "Shadow" , 0, 0, 1800, 1800, true, false, 3, 4, 3, Dyes.dyeBlue ); + public static Materials Shadow = new Materials( 368, TextureSet.SET_METALLIC , 32.0F, 8192, 4, 1|2 |8 |64|128 , 16, 3, 66, 0, "Shadow" , "Shadow Metal" , 0, 0, 1800, 1800, true, false, 3, 4, 3, Dyes.dyeBlue ); /** * Galaxy Space 1.10 compat from Version 2.6 @@ -787,8 +787,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); - public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); - public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); + public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadow Iron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); + public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadow Steel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); /** @@ -1539,7 +1539,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { LiveRoot.mChemicalFormula = ""; WoodSealed.mChemicalFormula = ""; Wood.mChemicalFormula = ""; - FoolsRuby.mChemicalFormula = Ruby.mChemicalFormula; Electrotine.mChemicalFormula = "Rp"; Trinium.mChemicalFormula = "Ke"; Naquadah.mChemicalFormula = "Nq"; @@ -2095,9 +2094,33 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { initMaterialProperties(); //No more material addition or manipulation should be done past this point! MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[0]); //Generate standard object array. This is a lot faster to loop over. VALUES = Arrays.asList(MATERIALS_ARRAY); - if (!Loader.isModLoaded("dreamcraft")) - if (!GT_Mod.gregtechproxy.mEnableAllComponents) - OrePrefixes.initMaterialComponents(); + if (!Loader.isModLoaded("dreamcraft") && !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.disableComponent(Materials.Reinforced); + OrePrefixes.ingotHot.disableComponent(Materials.ConductiveIron); + OrePrefixes.ingotHot.disableComponent(Materials.FierySteel); + OrePrefixes.ingotHot.disableComponent(Materials.ElectricalSteel); + OrePrefixes.ingotHot.disableComponent(Materials.EndSteel); + OrePrefixes.ingotHot.disableComponent(Materials.Soularium); + OrePrefixes.ingotHot.disableComponent(Materials.EnergeticSilver); + OrePrefixes.ingotHot.disableComponent(Materials.Cheese); + OrePrefixes.ingotHot.disableComponent(Materials.Calcium); + OrePrefixes.ingotHot.disableComponent(Materials.Flerovium); + OrePrefixes.ingotHot.disableComponent(Materials.Cobalt); + OrePrefixes.ingotHot.disableComponent(Materials.RedstoneAlloy); + OrePrefixes.ingotHot.disableComponent(Materials.Ardite); + OrePrefixes.ingotHot.disableComponent(Materials.DarkSteel); + OrePrefixes.ingotHot.disableComponent(Materials.EnergeticAlloy); + OrePrefixes.ingotHot.disableComponent(Materials.PulsatingIron); + OrePrefixes.ingotHot.disableComponent(Materials.CrudeSteel); + } fillGeneratedMaterialsMap(); diff --git a/src/main/java/gregtech/api/enums/OreDictNames.java b/src/main/java/gregtech/api/enums/OreDictNames.java index c9cf6af77a..d1c84f7119 100644 --- a/src/main/java/gregtech/api/enums/OreDictNames.java +++ b/src/main/java/gregtech/api/enums/OreDictNames.java @@ -75,4 +75,4 @@ public enum OreDictNames { craftingWireIron, craftingWireTin, craftingWorkBench, -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index 59c20d412b..ba91886c99 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -703,7 +703,7 @@ public enum OrePrefixes { if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) plateTriple.mDisabledItems.add(aMaterial); if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) plateQuadruple.mDisabledItems.add(aMaterial); if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) plateQuintuple.mDisabledItems.add(aMaterial); - if (!(enableUnusedDensePlates || GregTech_API.mGTPlusPlus) && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper)) + if (!(enableUnusedDensePlates || GregTech_API.mGTPlusPlus) && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper || aMaterial == Materials.Thaumium || aMaterial == Materials.Titanium)) plateDense.mDisabledItems.add(aMaterial); //Rotors if (!enableUnusedRotors && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || diff --git a/src/main/java/gregtech/api/enums/SubTag.java b/src/main/java/gregtech/api/enums/SubTag.java index b586728949..681358f8f1 100644 --- a/src/main/java/gregtech/api/enums/SubTag.java +++ b/src/main/java/gregtech/api/enums/SubTag.java @@ -279,4 +279,4 @@ public final class SubTag implements ICondition<ISubTagContainer> { public boolean isTrue(ISubTagContainer aObject) { return aObject.contains(this); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/TC_Aspects.java b/src/main/java/gregtech/api/enums/TC_Aspects.java index a7d7da1229..582ffb86f6 100644 --- a/src/main/java/gregtech/api/enums/TC_Aspects.java +++ b/src/main/java/gregtech/api/enums/TC_Aspects.java @@ -109,4 +109,4 @@ public enum TC_Aspects { return false; } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index 38a96bb4ac..2e11e79cfb 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -47,8 +47,8 @@ public class TextureSet { public final IIconContainer[] mTextures = new IIconContainer[128]; public final String mSetName; - private final static String aTextMatIconDir = "materialicons/"; - private final static String aTextVoidDir = "/void"; + private static final String aTextMatIconDir = "materialicons/"; + private static final String aTextVoidDir = "/void"; public TextureSet(String aSetName) { mSetName = aSetName; @@ -181,4 +181,4 @@ public class TextureSet { mTextures[126] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/handleMallet"); mTextures[127] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/toolHeadMallet"); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 38001faebb..b0f7f7a337 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -3,8 +3,7 @@ package gregtech.api.enums; import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.GT_SidedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -44,7 +43,24 @@ public class Textures { MACHINE_MAXV_BOTTOM, OVERLAY_SCHEST, + OVERLAY_SCHEST_GLOW, OVERLAY_STANK, + OVERLAY_STANK_GLOW, + + OVERLAY_PIPELINE_FLUID_BACK, + OVERLAY_PIPELINE_FLUID_FRONT, + OVERLAY_PIPELINE_FLUID_SIDE, + OVERLAY_PIPELINE_FLUID_SIDE_GLOW, + + OVERLAY_PIPELINE_ITEM_BACK, + OVERLAY_PIPELINE_ITEM_FRONT, + OVERLAY_PIPELINE_ITEM_SIDE, + OVERLAY_PIPELINE_ITEM_SIDE_GLOW, + + LONG_DISTANCE_PIPE_FLUID, + LONG_DISTANCE_PIPE_ITEM, + + HIDDEN_FACE, MACHINE_CASING_TANK_1, MACHINE_CASING_TANK_2, @@ -69,12 +85,14 @@ public class Textures { BLOCK_STEELEAF, BLOCK_ICHORIUM, BLOCK_FIRESTONE, + BLOCK_SHADOW, OVERLAY_ENERGY_IN_POWER, OVERLAY_ENERGY_OUT_POWER, OVERLAY_AUTOMAINTENANCE, + OVERLAY_AUTOMAINTENANCE_GLOW, OVERLAY_AUTOMAINTENANCE_IDLE, - OVERLAY_TELEPORTER_SIDES, + OVERLAY_AUTOMAINTENANCE_IDLE_GLOW, // VOID // The Empty Texture @@ -109,16 +127,26 @@ public class Textures { VENT_ADVANCED, COVER_WOOD_PLATE, ARROW_UP, + ARROW_UP_GLOW, ARROW_DOWN, + ARROW_DOWN_GLOW, ARROW_LEFT, + ARROW_LEFT_GLOW, ARROW_RIGHT, + ARROW_RIGHT_GLOW, AUTOMATION_FILTER, + AUTOMATION_FILTER_GLOW, AUTOMATION_TYPEFILTER, + AUTOMATION_TYPEFILTER_GLOW, AUTOMATION_CHESTBUFFER, + AUTOMATION_CHESTBUFFER_GLOW, AUTOMATION_SUPERBUFFER, + AUTOMATION_SUPERBUFFER_GLOW, AUTOMATION_REGULATOR, + AUTOMATION_REGULATOR_GLOW, AUTOMATION_ITEMDISTRIBUTOR, + AUTOMATION_ITEMDISTRIBUTOR_GLOW, CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, @@ -209,6 +237,7 @@ public class Textures { MACHINE_BRONZEBLASTFURNACE, MACHINE_BRONZEBLASTFURNACE_ACTIVE, + MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW, MACHINE_CASING_ROBUST_TUNGSTENSTEEL, MACHINE_CASING_CLEAN_STAINLESSSTEEL, MACHINE_CASING_STABLE_TITANIUM, @@ -221,13 +250,19 @@ public class Textures { MACHINE_CASING_FUSION, MACHINE_CASING_FUSION_GLASS, MACHINE_CASING_FUSION_GLASS_YELLOW, + MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW, MACHINE_CASING_FUSION_2, MACHINE_CASING_MAGIC, + MACHINE_CASING_MAGIC_GLOW, MACHINE_CASING_MAGIC_ACTIVE, + MACHINE_CASING_MAGIC_ACTIVE_GLOW, MACHINE_CASING_MAGIC_FRONT, + MACHINE_CASING_MAGIC_FRONT_GLOW, MACHINE_CASING_MAGIC_FRONT_ACTIVE, + MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW, MACHINE_CASING_DRAGONEGG, + MACHINE_CASING_DRAGONEGG_GLOW, MACHINE_CASING_SOLID_STEEL, MACHINE_CASING_FROST_PROOF, @@ -273,6 +308,7 @@ public class Textures { MACHINE_CASING_DENSEBRICKS, MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE, + MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW, MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE, MACHINE_COIL_KANTHAL, @@ -283,70 +319,124 @@ public class Textures { MACHINE_COIL_NAQUADAHALLOY, MACHINE_COIL_ELECTRUMFLUX, MACHINE_COIL_AWAKENEDDRACONIUM, + MACHINE_COIL_HSSS, + MACHINE_COIL_TRINIUM, BOILER_SOLAR, BOILER_FRONT, + BOILER_FRONT_GLOW, BOILER_FRONT_ACTIVE, + BOILER_FRONT_ACTIVE_GLOW, BOILER_LAVA_FRONT, + BOILER_LAVA_FRONT_GLOW, BOILER_LAVA_FRONT_ACTIVE, + BOILER_LAVA_FRONT_ACTIVE_GLOW, + NAQUADAH_REACTOR_SOLID_BACK, + NAQUADAH_REACTOR_SOLID_BACK_GLOW, NAQUADAH_REACTOR_SOLID_FRONT, + NAQUADAH_REACTOR_SOLID_FRONT_GLOW, NAQUADAH_REACTOR_SOLID_SIDE, + NAQUADAH_REACTOR_SOLID_SIDE_GLOW, NAQUADAH_REACTOR_SOLID_BOTTOM, - + NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW, NAQUADAH_REACTOR_SOLID_TOP, + NAQUADAH_REACTOR_SOLID_TOP_GLOW, NAQUADAH_REACTOR_SOLID_BACK_ACTIVE, + NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW, NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE, + NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW, NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE, + NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW, NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE, - + NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW, NAQUADAH_REACTOR_SOLID_TOP_ACTIVE, + NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW, + NAQUADAH_REACTOR_FLUID_BACK, + NAQUADAH_REACTOR_FLUID_BACK_GLOW, NAQUADAH_REACTOR_FLUID_FRONT, + NAQUADAH_REACTOR_FLUID_FRONT_GLOW, NAQUADAH_REACTOR_FLUID_SIDE, + NAQUADAH_REACTOR_FLUID_SIDE_GLOW, NAQUADAH_REACTOR_FLUID_BOTTOM, + NAQUADAH_REACTOR_FLUID_BOTTOM_GLOW, NAQUADAH_REACTOR_FLUID_TOP, - + NAQUADAH_REACTOR_FLUID_TOP_GLOW, NAQUADAH_REACTOR_FLUID_BACK_ACTIVE, + NAQUADAH_REACTOR_FLUID_BACK_ACTIVE_GLOW, NAQUADAH_REACTOR_FLUID_FRONT_ACTIVE, + NAQUADAH_REACTOR_FLUID_FRONT_ACTIVE_GLOW, NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE, + NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE_GLOW, NAQUADAH_REACTOR_FLUID_BOTTOM_ACTIVE, + NAQUADAH_REACTOR_FLUID_BOTTOM_ACTIVE_GLOW, NAQUADAH_REACTOR_FLUID_TOP_ACTIVE, + NAQUADAH_REACTOR_FLUID_TOP_ACTIVE_GLOW, DIESEL_GENERATOR_BACK, + DIESEL_GENERATOR_BACK_GLOW, DIESEL_GENERATOR_FRONT, + DIESEL_GENERATOR_FRONT_GLOW, DIESEL_GENERATOR_SIDE, + DIESEL_GENERATOR_SIDE_GLOW, DIESEL_GENERATOR_BOTTOM, + DIESEL_GENERATOR_BOTTOM_GLOW, DIESEL_GENERATOR_TOP, + DIESEL_GENERATOR_TOP_GLOW, DIESEL_GENERATOR_BACK_ACTIVE, + DIESEL_GENERATOR_BACK_ACTIVE_GLOW, DIESEL_GENERATOR_FRONT_ACTIVE, - + DIESEL_GENERATOR_FRONT_ACTIVE_GLOW, DIESEL_GENERATOR_SIDE_ACTIVE, + DIESEL_GENERATOR_SIDE_ACTIVE_GLOW, DIESEL_GENERATOR_BOTTOM_ACTIVE, + DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW, DIESEL_GENERATOR_TOP_ACTIVE, + DIESEL_GENERATOR_TOP_ACTIVE_GLOW, + GAS_TURBINE_BACK, + GAS_TURBINE_BACK_GLOW, GAS_TURBINE_FRONT, + GAS_TURBINE_FRONT_GLOW, GAS_TURBINE_SIDE, + GAS_TURBINE_SIDE_GLOW, GAS_TURBINE_BOTTOM, - + GAS_TURBINE_BOTTOM_GLOW, GAS_TURBINE_TOP, + GAS_TURBINE_TOP_GLOW, GAS_TURBINE_BACK_ACTIVE, + GAS_TURBINE_BACK_ACTIVE_GLOW, GAS_TURBINE_FRONT_ACTIVE, + GAS_TURBINE_FRONT_ACTIVE_GLOW, GAS_TURBINE_SIDE_ACTIVE, + GAS_TURBINE_SIDE_ACTIVE_GLOW, GAS_TURBINE_BOTTOM_ACTIVE, + GAS_TURBINE_BOTTOM_ACTIVE_GLOW, GAS_TURBINE_TOP_ACTIVE, - STEAM_TURBINE_BACK, + GAS_TURBINE_TOP_ACTIVE_GLOW, + STEAM_TURBINE_BACK, + STEAM_TURBINE_BACK_GLOW, STEAM_TURBINE_FRONT, + STEAM_TURBINE_FRONT_GLOW, STEAM_TURBINE_SIDE, + STEAM_TURBINE_SIDE_GLOW, STEAM_TURBINE_BOTTOM, + STEAM_TURBINE_BOTTOM_GLOW, STEAM_TURBINE_TOP, + STEAM_TURBINE_TOP_GLOW, STEAM_TURBINE_BACK_ACTIVE, + STEAM_TURBINE_BACK_ACTIVE_GLOW, STEAM_TURBINE_FRONT_ACTIVE, + STEAM_TURBINE_FRONT_ACTIVE_GLOW, STEAM_TURBINE_SIDE_ACTIVE, - + STEAM_TURBINE_SIDE_ACTIVE_GLOW, STEAM_TURBINE_BOTTOM_ACTIVE, + STEAM_TURBINE_BOTTOM_ACTIVE_GLOW, STEAM_TURBINE_TOP_ACTIVE, + STEAM_TURBINE_TOP_ACTIVE_GLOW, + BLOCK_BRONZEPREIN, BLOCK_STEELPREIN, BLOCK_TITANIUMPREIN, @@ -356,10 +446,10 @@ public class Textures { BLOCK_IRREIN, BLOCK_PLASCRETE, BLOCK_TSREIN, + OVERLAY_LOCKER, OVERLAY_LOCKER_000, OVERLAY_LOCKER_001, - OVERLAY_LOCKER_002, OVERLAY_LOCKER_003, OVERLAY_LOCKER_004, @@ -369,27 +459,35 @@ public class Textures { OVERLAY_LOCKER_008, OVERLAY_LOCKER_009, OVERLAY_LOCKER_010, - OVERLAY_LOCKER_011, OVERLAY_LOCKER_012, OVERLAY_LOCKER_013, + OVERLAY_LENS, OVERLAY_PIPE, OVERLAY_PIPE_IN, OVERLAY_PIPE_OUT, OVERLAY_MUFFLER, + OVERLAY_CONTROLLER, OVERLAY_ACTIVITYDETECTOR, - + OVERLAY_ACTIVITYDETECTOR_GLOW, OVERLAY_ENERGYDETECTOR, OVERLAY_FLUIDDETECTOR, OVERLAY_ITEMDETECTOR, + OVERLAY_FUSION1, + OVERLAY_FUSION1_GLOW, OVERLAY_FUSION2, + OVERLAY_FUSION2_GLOW, OVERLAY_FUSION3, + OVERLAY_FUSION3_GLOW, OVERLAY_SCREEN, + OVERLAY_SCREEN_GLOW, OVERLAY_QTANK, + OVERLAY_QTANK_GLOW, OVERLAY_QCHEST, + OVERLAY_QCHEST_GLOW, OVERLAY_SHUTTER, OVERLAY_CLOSET, @@ -398,6 +496,7 @@ public class Textures { OVERLAY_DATA_ACCESS, OVERLAY_CONVEYOR, OVERLAY_PUMP, + OVERLAY_VALVE, OVERLAY_ARM, OVERLAY_DRAIN, OVERLAY_CRAFTING, @@ -407,142 +506,260 @@ public class Textures { OVERLAY_ENERGY_IN_MULTI, OVERLAY_ENERGY_OUT_MULTI, OVERLAY_FRONT_LARGE_BOILER, + OVERLAY_FRONT_LARGE_BOILER_GLOW, OVERLAY_FRONT_LARGE_BOILER_ACTIVE, + OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW, OVERLAY_FRONT_VACUUM_FREEZER, + OVERLAY_FRONT_VACUUM_FREEZER_GLOW, OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE, + OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW, OVERLAY_FRONT_MULTI_SMELTER, + OVERLAY_FRONT_MULTI_SMELTER_GLOW, OVERLAY_FRONT_MULTI_SMELTER_ACTIVE, + OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW, OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE, + OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW, OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE, + OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW, OVERLAY_FRONT_IMPLOSION_COMPRESSOR, - + OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW, OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE, + OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW, + OVERLAY_TOP_POTIONBREWER, + OVERLAY_TOP_POTIONBREWER_GLOW, OVERLAY_TOP_REPLICATOR, + OVERLAY_TOP_REPLICATOR_GLOW, OVERLAY_TOP_MASSFAB, + OVERLAY_TOP_MASSFAB_GLOW, OVERLAY_TOP_STEAM_HAMMER, + OVERLAY_TOP_STEAM_HAMMER_GLOW, OVERLAY_TOP_STEAM_FURNACE, + OVERLAY_TOP_STEAM_FURNACE_GLOW, OVERLAY_TOP_STEAM_ALLOY_SMELTER, + OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW, OVERLAY_TOP_STEAM_MACERATOR, + OVERLAY_TOP_STEAM_MACERATOR_GLOW, OVERLAY_TOP_STEAM_COMPRESSOR, + OVERLAY_TOP_STEAM_COMPRESSOR_GLOW, OVERLAY_TOP_STEAM_EXTRACTOR, + OVERLAY_TOP_STEAM_EXTRACTOR_GLOW, OVERLAY_TOP_DISASSEMBLER, + OVERLAY_TOP_DISASSEMBLER_GLOW, OVERLAY_TOP_BOXINATOR, + OVERLAY_TOP_BOXINATOR_GLOW, OVERLAY_TOP_ROCK_BREAKER, + OVERLAY_TOP_ROCK_BREAKER_GLOW, OVERLAY_TOP_SCANNER, + OVERLAY_TOP_SCANNER_GLOW, OVERLAY_FRONT_POTIONBREWER, + OVERLAY_FRONT_POTIONBREWER_GLOW, OVERLAY_FRONT_REPLICATOR, + OVERLAY_FRONT_REPLICATOR_GLOW, OVERLAY_FRONT_MASSFAB, + OVERLAY_FRONT_MASSFAB_GLOW, OVERLAY_FRONT_STEAM_HAMMER, + OVERLAY_FRONT_STEAM_HAMMER_GLOW, + OVERLAY_FRONT_STEAM_HAMMER_ACTIVE, + OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW, OVERLAY_FRONT_STEAM_FURNACE, + OVERLAY_FRONT_STEAM_FURNACE_GLOW, OVERLAY_FRONT_STEAM_ALLOY_SMELTER, + OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW, OVERLAY_FRONT_STEAM_MACERATOR, + OVERLAY_FRONT_STEAM_MACERATOR_GLOW, + OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE, + OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW, OVERLAY_FRONT_STEAM_COMPRESSOR, + OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW, OVERLAY_FRONT_STEAM_EXTRACTOR, + OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW, OVERLAY_FRONT_DISASSEMBLER, + OVERLAY_FRONT_DISASSEMBLER_GLOW, + OVERLAY_FRONT_DISASSEMBLER_ACTIVE, + OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW, OVERLAY_FRONT_BOXINATOR, + OVERLAY_FRONT_BOXINATOR_GLOW, OVERLAY_FRONT_ROCK_BREAKER, + OVERLAY_FRONT_ROCK_BREAKER_GLOW, OVERLAY_FRONT_SCANNER, + OVERLAY_FRONT_SCANNER_GLOW, OVERLAY_BOTTOM_POTIONBREWER, + OVERLAY_BOTTOM_POTIONBREWER_GLOW, OVERLAY_BOTTOM_REPLICATOR, + OVERLAY_BOTTOM_REPLICATOR_GLOW, OVERLAY_BOTTOM_MASSFAB, + OVERLAY_BOTTOM_MASSFAB_GLOW, OVERLAY_BOTTOM_STEAM_HAMMER, + OVERLAY_BOTTOM_STEAM_HAMMER_GLOW, OVERLAY_BOTTOM_STEAM_FURNACE, + OVERLAY_BOTTOM_STEAM_FURNACE_GLOW, OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER, + OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW, OVERLAY_BOTTOM_STEAM_MACERATOR, + OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW, OVERLAY_BOTTOM_STEAM_COMPRESSOR, + OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW, OVERLAY_BOTTOM_STEAM_EXTRACTOR, + OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW, OVERLAY_BOTTOM_DISASSEMBLER, + OVERLAY_BOTTOM_DISASSEMBLER_GLOW, OVERLAY_BOTTOM_BOXINATOR, + OVERLAY_BOTTOM_BOXINATOR_GLOW, OVERLAY_BOTTOM_ROCK_BREAKER, + OVERLAY_BOTTOM_ROCK_BREAKER_GLOW, OVERLAY_BOTTOM_SCANNER, + OVERLAY_BOTTOM_SCANNER_GLOW, OVERLAY_SIDE_POTIONBREWER, + OVERLAY_SIDE_POTIONBREWER_GLOW, OVERLAY_SIDE_REPLICATOR, + OVERLAY_SIDE_REPLICATOR_GLOW, OVERLAY_SIDE_MASSFAB, + OVERLAY_SIDE_MASSFAB_GLOW, OVERLAY_SIDE_STEAM_HAMMER, + OVERLAY_SIDE_STEAM_HAMMER_GLOW, OVERLAY_SIDE_STEAM_FURNACE, + OVERLAY_SIDE_STEAM_FURNACE_GLOW, OVERLAY_SIDE_STEAM_ALLOY_SMELTER, + OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW, OVERLAY_SIDE_STEAM_MACERATOR, + OVERLAY_SIDE_STEAM_MACERATOR_GLOW, OVERLAY_SIDE_STEAM_COMPRESSOR, + OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW, OVERLAY_SIDE_STEAM_EXTRACTOR, + OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW, OVERLAY_SIDE_DISASSEMBLER, + OVERLAY_SIDE_DISASSEMBLER_GLOW, OVERLAY_SIDE_BOXINATOR, + OVERLAY_SIDE_BOXINATOR_GLOW, OVERLAY_SIDE_ROCK_BREAKER, + OVERLAY_SIDE_ROCK_BREAKER_GLOW, OVERLAY_SIDE_SCANNER, + OVERLAY_SIDE_SCANNER_GLOW, OVERLAY_TOP_POTIONBREWER_ACTIVE, + OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW, OVERLAY_TOP_REPLICATOR_ACTIVE, + OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW, OVERLAY_TOP_MASSFAB_ACTIVE, + OVERLAY_TOP_MASSFAB_ACTIVE_GLOW, OVERLAY_TOP_STEAM_HAMMER_ACTIVE, + OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW, OVERLAY_TOP_STEAM_FURNACE_ACTIVE, + OVERLAY_TOP_STEAM_FURNACE_ACTIVE_GLOW, OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE, + OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW, OVERLAY_TOP_STEAM_MACERATOR_ACTIVE, + OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW, OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE, + OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW, OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE, + OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW, OVERLAY_TOP_DISASSEMBLER_ACTIVE, + OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW, OVERLAY_TOP_BOXINATOR_ACTIVE, + OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW, OVERLAY_TOP_ROCK_BREAKER_ACTIVE, + OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW, OVERLAY_TOP_SCANNER_ACTIVE, + OVERLAY_TOP_SCANNER_ACTIVE_GLOW, OVERLAY_FRONT_POTIONBREWER_ACTIVE, + OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW, OVERLAY_FRONT_REPLICATOR_ACTIVE, + OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW, OVERLAY_FRONT_MASSFAB_ACTIVE, - OVERLAY_FRONT_STEAM_HAMMER_ACTIVE, + OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW, OVERLAY_FRONT_STEAM_FURNACE_ACTIVE, + OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW, OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE, + OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW, - OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE, OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE, + OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW, OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE, - OVERLAY_FRONT_DISASSEMBLER_ACTIVE, + OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW, OVERLAY_FRONT_BOXINATOR_ACTIVE, + OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW, OVERLAY_FRONT_ROCK_BREAKER_ACTIVE, + OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW, OVERLAY_FRONT_SCANNER_ACTIVE, + OVERLAY_FRONT_SCANNER_ACTIVE_GLOW, OVERLAY_BOTTOM_POTIONBREWER_ACTIVE, + OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW, OVERLAY_BOTTOM_REPLICATOR_ACTIVE, + OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW, OVERLAY_BOTTOM_MASSFAB_ACTIVE, + OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE, + OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE, + OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE, + OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE, + OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE, + OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW, OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE, + OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW, OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE, + OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW, OVERLAY_BOTTOM_BOXINATOR_ACTIVE, + OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW, OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE, + OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW, OVERLAY_BOTTOM_SCANNER_ACTIVE, + OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW, OVERLAY_SIDE_POTIONBREWER_ACTIVE, + OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW, OVERLAY_SIDE_REPLICATOR_ACTIVE, + OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW, OVERLAY_SIDE_MASSFAB_ACTIVE, + OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_HAMMER_ACTIVE, + OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_FURNACE_ACTIVE, + OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE, + OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE, + OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE, + OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW, OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE, + OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW, OVERLAY_SIDE_DISASSEMBLER_ACTIVE, + OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW, OVERLAY_SIDE_BOXINATOR_ACTIVE, + OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW, OVERLAY_SIDE_ROCK_BREAKER_ACTIVE, + OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW, OVERLAY_SIDE_SCANNER_ACTIVE, + OVERLAY_SIDE_SCANNER_ACTIVE_GLOW, OVERLAY_ADV_PUMP, OVERLAY_TELEPORTER, + OVERLAY_TELEPORTER_GLOW, OVERLAY_TELEPORTER_ACTIVE, + OVERLAY_TELEPORTER_ACTIVE_GLOW, + OVERLAY_TELEPORTER_SIDES, + OVERLAY_TELEPORTER_SIDES_GLOW, FUSIONI_1, FUSIONI_2, FUSIONI_3, @@ -847,33 +1064,57 @@ public class Textures { BASALT_BRICKS_CHISELED, BASALT_SMOOTH, OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE, + OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW, OVERLAY_FRONT_HEAT_EXCHANGER, + OVERLAY_FRONT_HEAT_EXCHANGER_GLOW, OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE, + OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW, OVERLAY_FRONT_PROCESSING_ARRAY, + OVERLAY_FRONT_PROCESSING_ARRAY_GLOW, OVERLAY_FRONT_OIL_DRILL_ACTIVE, + OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW, OVERLAY_FRONT_OIL_DRILL, + OVERLAY_FRONT_OIL_DRILL_GLOW, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, + OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW, OVERLAY_FRONT_DIESEL_ENGINE, + OVERLAY_FRONT_DIESEL_ENGINE_GLOW, OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE, + OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW, OVERLAY_FRONT_EXTREME_DIESEL_ENGINE, + OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE, + OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW, OVERLAY_FRONT_PYROLYSE_OVEN, + OVERLAY_FRONT_PYROLYSE_OVEN_GLOW, OVERLAY_FRONT_OIL_CRACKER_ACTIVE, + OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW, OVERLAY_FRONT_OIL_CRACKER, + OVERLAY_FRONT_OIL_CRACKER_GLOW, OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE, + OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW, OVERLAY_FRONT_DISTILLATION_TOWER, + OVERLAY_FRONT_DISTILLATION_TOWER_GLOW, OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, + OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW, OVERLAY_FRONT_ASSEMBLY_LINE, + OVERLAY_FRONT_ASSEMBLY_LINE_GLOW, OVERLAY_FRONT_ORE_DRILL_ACTIVE, + OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW, OVERLAY_FRONT_ORE_DRILL, + OVERLAY_FRONT_ORE_DRILL_GLOW, OVERLAY_TOP_CLEANROOM_ACTIVE, + OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW, OVERLAY_TOP_CLEANROOM, + OVERLAY_TOP_CLEANROOM_GLOW, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR, + OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE, + OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW, PIPE_RESTRICTOR_UP, PIPE_RESTRICTOR_DOWN, @@ -889,42 +1130,44 @@ public class Textures { PIPE_RESTRICTOR_UR, PIPE_RESTRICTOR_DL, PIPE_RESTRICTOR_DR, - PIPE_RESTRICTOR_LR; + PIPE_RESTRICTOR_LR, + + OVERLAY_ME_HATCH; /** * Icon for Fresh CFoam */ - public static final ITexture[] FRESHFOAM = new ITexture[]{new GT_RenderedTexture(CFOAM_FRESH)}; + public static final ITexture[] FRESHFOAM = {TextureFactory.of(CFOAM_FRESH)}; /** * Icons for Hardened CFoam * 0 = No Color * 1 - 16 = Colors */ - public static final ITexture[][] HARDENEDFOAMS = new ITexture[][]{ - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[0].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[1].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[2].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[3].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[4].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[5].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[6].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[7].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[8].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[9].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)} + 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)} }; /** * 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 = new IIconContainer[]{ + MACHINECASINGS_SIDE = { MACHINE_8V_SIDE, MACHINE_LV_SIDE, MACHINE_MV_SIDE, @@ -942,7 +1185,7 @@ public class Textures { MACHINE_OPV_SIDE, MACHINE_MAXV_SIDE, }, - MACHINECASINGS_TOP = new IIconContainer[]{ + MACHINECASINGS_TOP = { MACHINE_8V_TOP, MACHINE_LV_TOP, MACHINE_MV_TOP, @@ -960,7 +1203,7 @@ public class Textures { MACHINE_OPV_TOP, MACHINE_MAXV_TOP, }, - MACHINECASINGS_BOTTOM = new IIconContainer[]{ + MACHINECASINGS_BOTTOM = { MACHINE_8V_BOTTOM, MACHINE_LV_BOTTOM, MACHINE_MV_BOTTOM, @@ -978,7 +1221,7 @@ public class Textures { MACHINE_OPV_BOTTOM, MACHINE_MAXV_BOTTOM, }, - GRANITES = new IIconContainer[]{ + GRANITES = { GRANITE_BLACK_STONE, GRANITE_BLACK_COBBLE, GRANITE_BLACK_COBBLE_MOSSY, @@ -996,7 +1239,7 @@ public class Textures { GRANITE_RED_BRICKS_CHISELED, GRANITE_RED_SMOOTH, }, - CONCRETES = new IIconContainer[]{ + CONCRETES = { CONCRETE_DARK_STONE, CONCRETE_DARK_COBBLE, CONCRETE_DARK_COBBLE_MOSSY, @@ -1014,7 +1257,7 @@ public class Textures { CONCRETE_LIGHT_BRICKS_CHISELED, CONCRETE_LIGHT_SMOOTH, }, - STONES = new IIconContainer[]{ + STONES = { MARBLE_STONE, MARBLE_COBBLE, MARBLE_COBBLE_MOSSY, @@ -1032,7 +1275,7 @@ public class Textures { BASALT_BRICKS_CHISELED, BASALT_SMOOTH, }, - TURBINE = new IIconContainer[]{ + TURBINE = { LARGETURBINE_ST1, LARGETURBINE_ST2, LARGETURBINE_ST3, @@ -1043,7 +1286,7 @@ public class Textures { LARGETURBINE_ST8, LARGETURBINE_ST9 }, - TURBINE_ACTIVE = new IIconContainer[]{ + TURBINE_ACTIVE = { LARGETURBINE_ST_ACTIVE1, LARGETURBINE_ST_ACTIVE2, LARGETURBINE_ST_ACTIVE3, @@ -1054,7 +1297,7 @@ public class Textures { LARGETURBINE_ST_ACTIVE8, LARGETURBINE_ST_ACTIVE9 }, - TURBINE1 = new IIconContainer[]{ + TURBINE1 = { LARGETURBINE_SS1, LARGETURBINE_SS2, LARGETURBINE_SS3, @@ -1065,7 +1308,7 @@ public class Textures { LARGETURBINE_SS8, LARGETURBINE_SS9 }, - TURBINE_ACTIVE1 = new IIconContainer[]{ + TURBINE_ACTIVE1 = { LARGETURBINE_SS_ACTIVE1, LARGETURBINE_SS_ACTIVE2, LARGETURBINE_SS_ACTIVE3, @@ -1076,7 +1319,7 @@ public class Textures { LARGETURBINE_SS_ACTIVE8, LARGETURBINE_SS_ACTIVE9 }, - TURBINE2 = new IIconContainer[]{ + TURBINE2 = { LARGETURBINE_TI1, LARGETURBINE_TI2, LARGETURBINE_TI3, @@ -1087,7 +1330,7 @@ public class Textures { LARGETURBINE_TI8, LARGETURBINE_TI9 }, - TURBINE_ACTIVE2 = new IIconContainer[]{ + TURBINE_ACTIVE2 = { LARGETURBINE_TI_ACTIVE1, LARGETURBINE_TI_ACTIVE2, LARGETURBINE_TI_ACTIVE3, @@ -1098,7 +1341,7 @@ public class Textures { LARGETURBINE_TI_ACTIVE8, LARGETURBINE_TI_ACTIVE9 }, - TURBINE3 = new IIconContainer[]{ + TURBINE3 = { LARGETURBINE_TU1, LARGETURBINE_TU2, LARGETURBINE_TU3, @@ -1109,7 +1352,7 @@ public class Textures { LARGETURBINE_TU8, LARGETURBINE_TU9 }, - TURBINE_ACTIVE3 = new IIconContainer[]{ + TURBINE_ACTIVE3 = { LARGETURBINE_TU_ACTIVE1, LARGETURBINE_TU_ACTIVE2, LARGETURBINE_TU_ACTIVE3, @@ -1120,7 +1363,7 @@ public class Textures { LARGETURBINE_TU_ACTIVE8, LARGETURBINE_TU_ACTIVE9 }, - CONNECTED_HULLS = new IIconContainer[]{ + CONNECTED_HULLS = { CONCRETE_DARK_STONE, FUSIONI_1, FUSIONI_2, @@ -1147,7 +1390,7 @@ public class Textures { FUSIONII_11, FUSIONII_12, }, - STORAGE_BLOCKS1 = new IIconContainer[]{ + STORAGE_BLOCKS1 = { BLOCK_ADAMANTIUM, BLOCK_ALUMINIUM, BLOCK_AMERICIUM, @@ -1165,7 +1408,7 @@ public class Textures { BLOCK_BLUESTEEL, BLOCK_BRASS }, - STORAGE_BLOCKS2 = new IIconContainer[]{ + STORAGE_BLOCKS2 = { BLOCK_BRONZE, BLOCK_CAESIUM, BLOCK_CERIUM, @@ -1183,7 +1426,7 @@ public class Textures { BLOCK_DYSPROSIUM, BLOCK_ELECTRUM }, - STORAGE_BLOCKS3 = new IIconContainer[]{ + STORAGE_BLOCKS3 = { BLOCK_ELECTRUMFLUX, BLOCK_ENDERIUM, BLOCK_ERBIUM, @@ -1201,7 +1444,7 @@ public class Textures { BLOCK_IRONWOOD, BLOCK_KANTHAL }, - STORAGE_BLOCKS4 = new IIconContainer[]{ + STORAGE_BLOCKS4 = { BLOCK_KNIGHTMETAL, BLOCK_LANTHANUM, BLOCK_LEAD, @@ -1219,7 +1462,7 @@ public class Textures { BLOCK_NAQUADAHENRICHED, BLOCK_NAQUADRIA }, - STORAGE_BLOCKS5 = new IIconContainer[]{ + STORAGE_BLOCKS5 = { BLOCK_NEODYMIUM, BLOCK_NEODYMIUMMAGNETIC, BLOCK_NEUTRONIUM, @@ -1237,7 +1480,7 @@ public class Textures { BLOCK_PLUTONIUM241, BLOCK_PRASEODYMIUM }, - STORAGE_BLOCKS6 = new IIconContainer[]{ + STORAGE_BLOCKS6 = { BLOCK_PROMETHIUM, BLOCK_REDALLOY, BLOCK_REDSTEEL, @@ -1255,7 +1498,7 @@ public class Textures { BLOCK_STEELMAGNETIC, BLOCK_STERLINGSILVER }, - STORAGE_BLOCKS7 = new IIconContainer[]{ + STORAGE_BLOCKS7 = { BLOCK_SUNNARIUM, BLOCK_TANTALUM, BLOCK_TELLURIUM, @@ -1273,7 +1516,7 @@ public class Textures { BLOCK_URANIUM, BLOCK_URANIUM235 }, - STORAGE_BLOCKS8 = new IIconContainer[]{ + STORAGE_BLOCKS8 = { BLOCK_VANADIUM, BLOCK_VANADIUMGALLIUM, BLOCK_WROUGHTIRON, @@ -1288,9 +1531,10 @@ public class Textures { BLOCK_HSSS, BLOCK_STEELEAF, BLOCK_ICHORIUM, - BLOCK_FIRESTONE + BLOCK_FIRESTONE, + BLOCK_SHADOW }, - STORAGE_BLOCKS9 = new IIconContainer[]{ + STORAGE_BLOCKS9 = { BLOCK_AERCRYSTAL, BLOCK_AMBER, BLOCK_AMETHYST, @@ -1308,7 +1552,7 @@ public class Textures { BLOCK_IGNISCRYSTAL, BLOCK_JASPER }, - STORAGE_BLOCKS10 = new IIconContainer[]{ + STORAGE_BLOCKS10 = { BLOCK_LAZURITE, BLOCK_LIGNITE, BLOCK_MONAZITE, @@ -1326,7 +1570,7 @@ public class Textures { BLOCK_TANZANITE, BLOCK_TERRACRYSTAL }, - STORAGE_BLOCKS11 = new IIconContainer[]{ + STORAGE_BLOCKS11 = { BLOCK_TOPAZ, BLOCK_VINTEUM, BLOCK_YELLOWGARNET, @@ -1334,133 +1578,136 @@ public class Textures { BLOCK_CHARCOAL, BLOCK_BLAZE }; + public static ITexture[] HIDDEN_TEXTURE = { + TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() + }; public static ITexture[] - ERROR_RENDERING = new ITexture[]{ - new GT_RenderedTexture(RENDERING_ERROR) + ERROR_RENDERING = { + TextureFactory.of(RENDERING_ERROR) }; - public static ITexture[] OVERLAYS_ENERGY_IN = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{40, 40, 245, 0}), + public static 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}), }; - public static ITexture[] OVERLAYS_ENERGY_OUT = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, 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}), }; - public static ITexture[] OVERLAYS_ENERGY_IN_MULTI = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{40, 40, 245, 0}), + public static 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}), }; - public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{40, 40, 245, 0}), + public static 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}), }; - public static ITexture[] OVERLAYS_ENERGY_IN_POWER = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{40, 40, 245, 0}), + public static 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}), }; - public static ITexture[] OVERLAYS_ENERGY_OUT_POWER = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{40, 40, 245, 0}), + public static 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 ITexture[] LOCKERS = new ITexture[]{ - new GT_RenderedTexture(OVERLAY_LOCKER_000), - new GT_RenderedTexture(OVERLAY_LOCKER_001), - new GT_RenderedTexture(OVERLAY_LOCKER_002), - new GT_RenderedTexture(OVERLAY_LOCKER_003), - new GT_RenderedTexture(OVERLAY_LOCKER_004), - new GT_RenderedTexture(OVERLAY_LOCKER_005), - new GT_RenderedTexture(OVERLAY_LOCKER_006), - new GT_RenderedTexture(OVERLAY_LOCKER_007), - new GT_RenderedTexture(OVERLAY_LOCKER_008), - new GT_RenderedTexture(OVERLAY_LOCKER_009), - new GT_RenderedTexture(OVERLAY_LOCKER_010), - new GT_RenderedTexture(OVERLAY_LOCKER_011), - new GT_RenderedTexture(OVERLAY_LOCKER_012), - new GT_RenderedTexture(OVERLAY_LOCKER_013), + public static 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] @@ -1473,24 +1720,17 @@ public class Textures { */ public static ITexture[][] casingTexturePages = new ITexture[128][];//page holder so we don't make an short long array - public static ITexture getCasingTextureForId(int id){ - return casingTexturePages[(id>>7)&0x7f][id&0x7f]; - } - public static void setCasingTextureForId(int id,ITexture iTexture){ - casingTexturePages[(id>>7)&0x7f][id&0x7f]=iTexture; - } - public static void setCasingTexture(byte page,byte index,ITexture iTexture){ - casingTexturePages[page][index]=iTexture; - } - static { for (byte i = 0; i < MACHINE_CASINGS.length; i++) for (byte j = 0; j < MACHINE_CASINGS[i].length; j++) - MACHINE_CASINGS[i][j] = new GT_SidedTexture(MACHINECASINGS_BOTTOM[i], MACHINECASINGS_TOP[i], MACHINECASINGS_SIDE[i], Dyes.getModulation(j - 1, Dyes.MACHINE_METAL.mRGBa)); - casingTexturePages[0] = CASING_BLOCKS; + 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); - GT_Utility.addTexturePage((byte)8); + GT_Utility.addTexturePage((byte) 1); + GT_Utility.addTexturePage((byte) 8); } protected IIcon mIcon; @@ -1499,6 +1739,18 @@ public class Textures { GregTech_API.sGTBlockIconload.add(this); } + public static ITexture getCasingTextureForId(int id) { + return casingTexturePages[(id >> 7) & 0x7f][id & 0x7f]; + } + + public static void setCasingTextureForId(int id, ITexture iTexture) { + casingTexturePages[(id >> 7) & 0x7f][id & 0x7f] = iTexture; + } + + public static void setCasingTexture(byte page, byte index, ITexture iTexture) { + casingTexturePages[page][index] = iTexture; + } + @Override public IIcon getIcon() { return mIcon; @@ -1510,13 +1762,13 @@ public class Textures { } @Override - public void run() { - mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + "iconsets/" + this); + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; } @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; + public void run() { + mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + "iconsets/" + this); } public static class CustomIcon implements IIconContainer, Runnable { @@ -1539,13 +1791,13 @@ public class Textures { } @Override - public void run() { - mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + mIconName); + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; } @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; + public void run() { + mIcon = GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + mIconName); } } } @@ -1599,7 +1851,7 @@ public class Textures { TURBINE_HUGE; public static final IIconContainer[] - DURABILITY_BAR = new IIconContainer[]{ + DURABILITY_BAR = { DURABILITY_BAR_0, DURABILITY_BAR_1, DURABILITY_BAR_2, @@ -1610,7 +1862,7 @@ public class Textures { DURABILITY_BAR_7, DURABILITY_BAR_8, }, - ENERGY_BAR = new IIconContainer[]{ + ENERGY_BAR = { ENERGY_BAR_0, ENERGY_BAR_1, ENERGY_BAR_2, @@ -1622,7 +1874,7 @@ public class Textures { ENERGY_BAR_8, }; - public static final ITexture[] ERROR_RENDERING = new ITexture[]{new GT_RenderedTexture(RENDERING_ERROR)}; + public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; protected IIcon mIcon, mOverlay; @@ -1671,14 +1923,14 @@ public class Textures { } @Override - public void run() { - mIcon = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName); - mOverlay = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName + "_OVERLAY"); + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; } @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; + public void run() { + mIcon = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName); + mOverlay = GregTech_API.sItemIcons.registerIcon(RES_PATH_ITEM + mIconName + "_OVERLAY"); } } } diff --git a/src/main/java/gregtech/api/enums/ToolDictNames.java b/src/main/java/gregtech/api/enums/ToolDictNames.java index d81bbeae4e..d41c63c717 100644 --- a/src/main/java/gregtech/api/enums/ToolDictNames.java +++ b/src/main/java/gregtech/api/enums/ToolDictNames.java @@ -29,4 +29,14 @@ public enum ToolDictNames { craftingToolScrewdriver, craftingToolSolderingIron, craftingToolSolderingMetal; -}
\ No newline at end of file + + public static boolean contains(String aName) { + if (!aName.startsWith("craftingTool")) return false; + for (ToolDictNames tool: ToolDictNames.values()) { + if (tool.toString().equals(aName)) { + return true; + } + } + return false; + } +} diff --git a/src/main/java/gregtech/api/events/BlockScanningEvent.java b/src/main/java/gregtech/api/events/BlockScanningEvent.java index 73cc3da79f..93c4f6881c 100644 --- a/src/main/java/gregtech/api/events/BlockScanningEvent.java +++ b/src/main/java/gregtech/api/events/BlockScanningEvent.java @@ -40,4 +40,4 @@ public class BlockScanningEvent extends WorldEvent { mClickY = aClickY; mClickZ = aClickZ; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMap.java b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java new file mode 100644 index 0000000000..98c8215fc7 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java @@ -0,0 +1,174 @@ +package gregtech.api.graphs; + +import gregtech.api.graphs.consumers.ConsumerNode; +import gregtech.api.graphs.paths.NodePath; +import gregtech.api.metatileentity.*; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; +import java.util.HashSet; + +import static gregtech.api.util.GT_Utility.getOppositeSide; + + +//generates the node map +abstract public 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) { + BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) aNode.mTileEntity; + tPipe.setNode(null); + tPipe.setNodePath(null); + if (aNode.mSelfPath != null) { + aNode.mSelfPath.clearPath(); + aNode.mSelfPath = null; + } + } + for (int i = 0;i<6;i++) { + NodePath tPath = aNode.mNodePaths[i]; + if (tPath != null) { + tPath.clearPath(); + aNode.mNodePaths[i] = null; + } + Node tNextNode = aNode.mNeighbourNodes[i]; + if (tNextNode == null) continue; + if (tNextNode.mNodeValue != aReturnNodeValue) + clearNodeMap(tNextNode,aNode.mNodeValue); + aNode.mNeighbourNodes[i] = null; + } + } + + //gets the next node + protected void generateNextNode(BaseMetaPipeEntity aPipe, Node aPipeNode, byte aInvalidSide, int aNextNodeValue, + ArrayList<ConsumerNode> tConsumers, HashSet<Node> tNodeMap) { + MetaPipeEntity tMetaPipe = (MetaPipeEntity) aPipe.getMetaTileEntity(); + for (byte i = 0;i<6;i++) { + if (i==aInvalidSide) { + continue; + } + TileEntity tNextTileEntity = aPipe.getTileEntityAtSide(i); + if (tNextTileEntity == null || (tMetaPipe != null && !tMetaPipe.isConnectedAtSide(i))) continue; + ArrayList<MetaPipeEntity> tNewPipes = new ArrayList<MetaPipeEntity>(); + Pair nextTileEntity = getNextValidTileEntity(tNextTileEntity,tNewPipes,i,tNodeMap); + if (nextTileEntity != null) { + Node tNextNode = generateNode(nextTileEntity.mTileEntity,aPipeNode,aNextNodeValue+1,tNewPipes, + nextTileEntity.mSide,tConsumers,tNodeMap); + if (tNextNode != null) { + aNextNodeValue = tNextNode.mHighestNodeValue; + aPipeNode.mHighestNodeValue = tNextNode.mHighestNodeValue; + aPipeNode.mNeighbourNodes[i] = tNextNode; + aPipeNode.mNodePaths[i] = aPipeNode.mReturnPath; + } + } + } + } + + //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) { + if (aTileEntity.isInvalid()) return null; + byte tSideOp = getOppositeSide(aSide); + byte tInvalidSide = aPreviousNode == null ? -1 : tSideOp; + Node tThisNode = null; + if (isPipe(aTileEntity)){ + BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) aTileEntity; + MetaPipeEntity tMetaPipe = (MetaPipeEntity) tPipe.getMetaTileEntity(); + int tConnections = getNumberOfConnections(tMetaPipe); + Node tPipeNode; + if (tConnections == 1) { + tPipeNode = getEmptyNode(aNextNodeValue,tSideOp,aTileEntity,aConsumers); + if (tPipeNode == null) return null; + } else { + tPipeNode = getPipeNode(aNextNodeValue,tSideOp,aTileEntity,aConsumers); + } + tPipe.setNode(tPipeNode); + aNodeMap.add(tPipeNode); + tPipeNode.mSelfPath = getNewPath(new MetaPipeEntity[]{tMetaPipe}); + tThisNode = tPipeNode; + if (tInvalidSide>-1) { + tPipeNode.mNeighbourNodes[tInvalidSide] = aPreviousNode; + tPipeNode.mNodePaths[tInvalidSide] = getNewPath(aPipes.toArray(new MetaPipeEntity[0])); + aPreviousNode.mReturnPath = tPipeNode.mNodePaths[tInvalidSide]; + } + if (tConnections > 1) + generateNextNode(tPipe,tPipeNode,tInvalidSide,aNextNodeValue,aConsumers,aNodeMap); + } else if (addConsumer(aTileEntity,tSideOp,aNextNodeValue,aConsumers)) { + ConsumerNode tConsumeNode = aConsumers.get(aConsumers.size()-1); + tConsumeNode.mNeighbourNodes[tSideOp] = aPreviousNode; + tConsumeNode.mNodePaths[tSideOp] = getNewPath(aPipes.toArray(new MetaPipeEntity[0])); + aPreviousNode.mReturnPath = tConsumeNode.mNodePaths[tSideOp]; + tThisNode = tConsumeNode; + } + return tThisNode; + } + + //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) { + if (isPipe(aTileEntity)) { + BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) aTileEntity; + MetaPipeEntity tMetaPipe = (MetaPipeEntity) tPipe.getMetaTileEntity(); + Node tNode = tPipe.getNode(); + if (tNode != null) { + if (aNodeMap.contains(tNode)) + return null; + } + int tConnections = getNumberOfConnections(tMetaPipe); + if (tConnections == 2) { + byte tSideOp = getOppositeSide(aSide); + for (byte i = 0;i<6;i++) { + if (i == tSideOp || !(tMetaPipe.isConnectedAtSide(i))) continue; + TileEntity tNewTileEntity = tPipe.getTileEntityAtSide(i); + if (tNewTileEntity == null) continue; + if (isPipe(tNewTileEntity)) { + aPipes.add(tMetaPipe); + return getNextValidTileEntity(tNewTileEntity,aPipes,i,aNodeMap); + } else { + return new Pair(aTileEntity,i); + } + } + } else { + return new Pair(aTileEntity,aSide); + } + } else { + return new Pair(aTileEntity,aSide); + } + return null; + } + + private static class Pair { + public byte mSide; + public TileEntity mTileEntity; + public Pair(TileEntity aTileEntity, byte aSide) { + this.mTileEntity = aTileEntity; + this.mSide = aSide; + } + } + + //if check if the tile entity is the correct pipe + protected boolean isPipe(TileEntity aTileEntity) { + return aTileEntity instanceof BaseMetaPipeEntity; + } + //checks if the tile entity is a consumer and add to the list + abstract protected boolean addConsumer(TileEntity aTileEntity, byte aSide, int aNodeValue, ArrayList<ConsumerNode> aConsumers); + //get correct pathClass that you need for your node network + protected abstract NodePath getNewPath(MetaPipeEntity[] aPipes); + + //used for if you need to use death ends for something + //can be null + protected Node getEmptyNode(int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + return null; + } + //get correct node type you need for your network + protected Node getPipeNode(int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + return new Node(aNodeValue,aTileEntity,aConsumers); + } + + //get how many connections the pipe have + private static int getNumberOfConnections(MetaPipeEntity aPipe) { + int tCons = 0; + for (int i = 0; i < 6; i++) { + if (aPipe.isConnectedAtSide(i)) tCons++; + } + return tCons; + } +} diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java new file mode 100644 index 0000000000..76a24e8802 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java @@ -0,0 +1,90 @@ +package gregtech.api.graphs; + +import cofh.api.energy.IEnergyReceiver; +import gregtech.api.GregTech_API; +import gregtech.api.graphs.consumers.*; +import gregtech.api.graphs.paths.NodePath; +import gregtech.api.graphs.paths.PowerNodePath; +import gregtech.api.interfaces.tileentity.IEnergyConnected; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.MetaPipeEntity; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; +import ic2.api.energy.tile.IEnergySink; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.ArrayList; +import java.util.HashSet; + +//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<>()); + } + + @Override + protected boolean isPipe(TileEntity aTileEntity) { + return super.isPipe(aTileEntity) && ((BaseMetaPipeEntity) aTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable; + } + + @Override + protected NodePath getNewPath(MetaPipeEntity[] aPipes) { + return new PowerNodePath(aPipes); + } + + //used to apply voltage on death ends + @Override + 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; + } + + @Override + protected Node getPipeNode(int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + return new PowerNode(aNodeValue, aTileEntity, aConsumers); + } + + @Override + 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)) { + ConsumerNode tConsumerNode = new NodeGTBaseMetaTile(aNodeValue, tBaseTileEntity, aSide, aConsumers); + aConsumers.add(tConsumerNode); + return true; + } + + } else if (aTileEntity instanceof IEnergyConnected) { + IEnergyConnected tTileEntity = (IEnergyConnected) aTileEntity; + if (tTileEntity.inputEnergyFrom(aSide,false)) { + ConsumerNode tConsumerNode = new NodeEnergyConnected(aNodeValue,tTileEntity,aSide,aConsumers); + aConsumers.add(tConsumerNode); + return true; + } + } else if (aTileEntity instanceof IEnergySink) { + //ic2 wants the tilentitty next to it of that side not going to add a bunch of arguments just for ic2 + //crossborder checks to not not load chuncks just to make sure + int dX = aTileEntity.xCoord + ForgeDirection.getOrientation(aSide).offsetX; + int dY = aTileEntity.yCoord + ForgeDirection.getOrientation(aSide).offsetY; + int dZ = aTileEntity.zCoord + ForgeDirection.getOrientation(aSide).offsetZ; + boolean crossesChuncks = dX >> 4 != aTileEntity.xCoord >> 4 || dZ >> 4 != aTileEntity.zCoord >> 4; + TileEntity tNextTo = null; + if (!crossesChuncks || !aTileEntity.getWorldObj().blockExists(dX, dY, dZ)) + tNextTo = aTileEntity.getWorldObj().getTileEntity(dX, dY, dZ); + + if (((IEnergySink) aTileEntity).acceptsEnergyFrom(tNextTo, ForgeDirection.getOrientation(aSide))) { + 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); + aConsumers.add(tConsumerNode); + return true; + } + return false; + } +} diff --git a/src/main/java/gregtech/api/graphs/Node.java b/src/main/java/gregtech/api/graphs/Node.java new file mode 100644 index 0000000000..258915e473 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/Node.java @@ -0,0 +1,30 @@ +package gregtech.api.graphs; + +import gregtech.api.graphs.consumers.ConsumerNode; +import gregtech.api.graphs.paths.NodePath; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import java.util.ArrayList; + +//base Node class +public class Node { + public Node(int aNodeValue,TileEntity aTileEntity,ArrayList<ConsumerNode> aConsumers){ + this.mNodeValue = aNodeValue; + this.mTileEntity = aTileEntity; + this.mConsumers = aConsumers; + mHighestNodeValue = aNodeValue; + //you don't want to generate map multiple times in the same tick + mCreationTime = MinecraftServer.getServer().getTickCounter(); + } + + + public int mCreationTime; + public NodePath mSelfPath; + public ArrayList<ConsumerNode> mConsumers; + public int mNodeValue; + public final TileEntity mTileEntity; + public Node[] mNeighbourNodes = new Node[6]; + public NodePath[] mNodePaths = new NodePath[6]; + public NodePath mReturnPath; + public int mHighestNodeValue; +} diff --git a/src/main/java/gregtech/api/graphs/NodeList.java b/src/main/java/gregtech/api/graphs/NodeList.java new file mode 100644 index 0000000000..36ebbc4f6f --- /dev/null +++ b/src/main/java/gregtech/api/graphs/NodeList.java @@ -0,0 +1,24 @@ +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; + public NodeList(Node[] mNodes) { + this.mNodes = mNodes; + } + + Node getNextNode() { + if (++mCounter < mNodes.length) + return mNodes[mCounter]; + else + return null; + } + + Node getNode() { + if (mCounter < mNodes.length) + return mNodes[mCounter]; + else + return null; + } +} diff --git a/src/main/java/gregtech/api/graphs/PowerNode.java b/src/main/java/gregtech/api/graphs/PowerNode.java new file mode 100644 index 0000000000..a92e3ea0ca --- /dev/null +++ b/src/main/java/gregtech/api/graphs/PowerNode.java @@ -0,0 +1,14 @@ +package gregtech.api.graphs; + +import gregtech.api.graphs.consumers.ConsumerNode; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; + +//base node for power networks +public class PowerNode extends Node{ + public boolean mHadVoltage = false; + public PowerNode(int aNodeValue, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue, aTileEntity, aConsumers); + } +} diff --git a/src/main/java/gregtech/api/graphs/PowerNodes.java b/src/main/java/gregtech/api/graphs/PowerNodes.java new file mode 100644 index 0000000000..411d690cca --- /dev/null +++ b/src/main/java/gregtech/api/graphs/PowerNodes.java @@ -0,0 +1,162 @@ +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 + * + */ +public class PowerNodes { + //check if the looked for node is next to or get the next node that is closer to it + static public int powerNode(Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, int aVoltage, int aMaxAmps) { + int tAmpsUsed = 0; + ConsumerNode tConsumer =(ConsumerNode) aConsumers.getNode(); + int tLoopProtection = 0; + while (tConsumer != null) { + int tTargetNodeValue = tConsumer.mNodeValue; + //if the target node has a value less then the current node + if (tTargetNodeValue < aCurrentNode.mNodeValue || tTargetNodeValue > aCurrentNode.mHighestNodeValue) { + for (int j = 0;j<6;j++) { + Node tNextNode = aCurrentNode.mNeighbourNodes[j]; + if (tNextNode != null && tNextNode.mNodeValue < aCurrentNode.mNodeValue) { + if (tNextNode.mNodeValue == tConsumer.mNodeValue) { + tAmpsUsed += processNodeInject(aCurrentNode,tConsumer,j,aMaxAmps-tAmpsUsed,aVoltage,false); + tConsumer =(ConsumerNode) aConsumers.getNextNode(); + break; + } else { + if (aPreviousNode == tNextNode) return tAmpsUsed; + tAmpsUsed += processNextNode(aCurrentNode,tNextNode,aConsumers,j,aMaxAmps-tAmpsUsed,aVoltage); + tConsumer =(ConsumerNode) aConsumers.getNode(); + break; + } + } + } + } else { + //if the target node has a node value greater then current node value + for (int side = 5;side>-1;side--) { + Node tNextNode = aCurrentNode.mNeighbourNodes[side]; + if (tNextNode == null) continue; + if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { + if (tNextNode == aPreviousNode) return tAmpsUsed; + tAmpsUsed += processNextNodeAbove(aCurrentNode,tNextNode,aConsumers,side,aMaxAmps-tAmpsUsed,aVoltage); + tConsumer =(ConsumerNode) aConsumers.getNode(); + break; + } else if (tNextNode.mNodeValue == tTargetNodeValue) { + tAmpsUsed += processNodeInject(aCurrentNode,tConsumer,side,aMaxAmps-tAmpsUsed,aVoltage,true); + tConsumer =(ConsumerNode) aConsumers.getNextNode(); + break; + } + } + } + if (aMaxAmps - tAmpsUsed <= 0) { + return tAmpsUsed; + } + if (tLoopProtection++ > 20) { + throw new NullPointerException("infinite loop in powering nodes "); + } + } + return tAmpsUsed; + } + + //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 int powerNodeAbove(Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, int aVoltage, int aMaxAmps) { + int tAmpsUsed = 0; + int tLoopProtection = 0; + ConsumerNode tConsumer =(ConsumerNode) aConsumers.getNode(); + while (tConsumer != null) { + int tTargetNodeValue = tConsumer.mNodeValue; + if (tTargetNodeValue > aCurrentNode.mHighestNodeValue || tTargetNodeValue < aCurrentNode.mNodeValue) { + return tAmpsUsed; + } else { + for (int side = 5;side>-1;side--) { + Node tNextNode = aCurrentNode.mNeighbourNodes[side]; + if (tNextNode == null) continue; + if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { + if (tNextNode == aPreviousNode) return tAmpsUsed; + tAmpsUsed += processNextNodeAbove(aCurrentNode,tNextNode,aConsumers,side,aMaxAmps-tAmpsUsed,aVoltage); + tConsumer =(ConsumerNode) aConsumers.getNode(); + break; + } else if (tNextNode.mNodeValue == tTargetNodeValue) { + tAmpsUsed += processNodeInject(aCurrentNode,tConsumer,side,aMaxAmps-tAmpsUsed,aVoltage,true); + tConsumer =(ConsumerNode) aConsumers.getNextNode(); + break; + } + } + } + if (aMaxAmps - tAmpsUsed <= 0) { + return tAmpsUsed; + } + if (tLoopProtection++ > 20) { + throw new NullPointerException("infinite loop in powering nodes "); + } + } + return tAmpsUsed; + } + + protected static int processNextNode(Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, int aMaxAmps, int aVoltage) { + PowerNodePath tPath = (PowerNodePath)aCurrentNode.mNodePaths[aSide]; + PowerNodePath tSelfPath = (PowerNodePath) aCurrentNode.mSelfPath; + int tVoltLoss = 0; + if (tSelfPath != null) { + tVoltLoss += tSelfPath.getLoss(); + tSelfPath.applyVoltage(aVoltage,false); + } + tPath.applyVoltage(aVoltage - tVoltLoss,true); + tVoltLoss += tPath.getLoss(); + int tAmps = powerNode(aNextNode,aCurrentNode,aConsumers,aVoltage - tVoltLoss,aMaxAmps ); + tPath.addAmps(tAmps); + if (tSelfPath != null) + tSelfPath.addAmps(tAmps); + return tAmps; + } + + protected static int processNextNodeAbove(Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, int aMaxAmps, int aVoltage) { + PowerNodePath tPath = (PowerNodePath)aCurrentNode.mNodePaths[aSide]; + PowerNodePath tSelfPath = (PowerNodePath) aCurrentNode.mSelfPath; + int tVoltLoss = 0; + if (tSelfPath != null) { + tVoltLoss += tSelfPath.getLoss(); + tSelfPath.applyVoltage(aVoltage,false); + } + tPath.applyVoltage(aVoltage - tVoltLoss,true); + tVoltLoss += tPath.getLoss(); + int tAmps = powerNodeAbove(aNextNode,aCurrentNode,aConsumers,aVoltage - tVoltLoss,aMaxAmps ); + tPath.addAmps(tAmps); + if (tSelfPath != null) + tSelfPath.addAmps(tAmps); + return tAmps; + } + + protected static int processNodeInject(Node aCurrentNode, ConsumerNode aConsumer, int aSide,int aMaxAmps, int aVoltage, + boolean isUp) { + PowerNodePath tPath = (PowerNodePath)aCurrentNode.mNodePaths[aSide]; + PowerNodePath tSelfPath = (PowerNodePath) aCurrentNode.mSelfPath; + int tVoltLoss = 0; + if (tSelfPath != null) { + tVoltLoss += tSelfPath.getLoss(); + tSelfPath.applyVoltage(aVoltage,false); + } + tPath.applyVoltage(aVoltage - tVoltLoss,true); + tVoltLoss += tPath.getLoss(); + int tAmps = aConsumer.injectEnergy(aVoltage - tVoltLoss,aMaxAmps); + tPath.addAmps(tAmps); + if (tSelfPath != null) + tSelfPath.addAmps(tAmps); + return tAmps; + } +} diff --git a/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java new file mode 100644 index 0000000000..87376008c4 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java @@ -0,0 +1,23 @@ +package gregtech.api.graphs.consumers; + +import gregtech.api.graphs.Node; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; + +//node attached to a tile entity that can consume stuff from the network +public class ConsumerNode extends Node { + public byte mSide; + public ConsumerNode(int aNodeValue, TileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue,aTileEntity,aConsumers); + this.mSide = aSide; + } + + public boolean needsEnergy() { + return !mTileEntity.isInvalid(); + } + + public int injectEnergy(int aVoltage, int aMaxAmps) { + return 0; + } +} diff --git a/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java new file mode 100644 index 0000000000..da3d0a757b --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java @@ -0,0 +1,27 @@ +package gregtech.api.graphs.consumers; + +import gregtech.api.graphs.paths.PowerNodePath; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; + +//this is here to apply voltage to death ends +public class EmptyPowerConsumer extends ConsumerNode{ + public EmptyPowerConsumer(int aNodeValue, TileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue, aTileEntity, aSide, aConsumers); + } + + @Override + public boolean needsEnergy() { + return false; + } + + @Override + public int injectEnergy(int aVoltage, int aMaxAmps) { + BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) mTileEntity; + PowerNodePath tPath =(PowerNodePath) tPipe.getNodePath(); + tPath.applyVoltage(aVoltage,true); + return 0; + } +} diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java new file mode 100644 index 0000000000..baff232d94 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java @@ -0,0 +1,22 @@ +package gregtech.api.graphs.consumers; + +import gregtech.api.interfaces.tileentity.IEnergyConnected; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; + +public class NodeEnergyConnected extends ConsumerNode { + public NodeEnergyConnected(int aNodeValue, IEnergyConnected aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue,(TileEntity) aTileEntity, aSide, aConsumers); + } + + @Override + public boolean needsEnergy() { + return super.needsEnergy(); + } + + @Override + public int injectEnergy(int aVoltage, int aMaxAmps) { + return (int) ((IEnergyConnected)mTileEntity).injectEnergyUnits(mSide,aVoltage,aMaxAmps); + } +} diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java new file mode 100644 index 0000000000..a24c4acbcd --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java @@ -0,0 +1,86 @@ +package gregtech.api.graphs.consumers; + +import cofh.api.energy.IEnergyReceiver; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; +import gregtech.common.GT_Pollution; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.ArrayList; + +import static gregtech.api.enums.GT_Values.V; + +//consumer for RF machines +public class NodeEnergyReceiver extends ConsumerNode { + int mRestRF = 0; + public NodeEnergyReceiver(int aNodeValue, IEnergyReceiver aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue, (TileEntity) aTileEntity, aSide, aConsumers); + } + + @Override + public int injectEnergy(int aVoltage, int aMaxAmps) { + ForgeDirection tDirection = ForgeDirection.getOrientation(mSide); + int rfOut = GT_Utility.safeInt(aVoltage * GregTech_API.mEUtoRF / 100); + int ampsUsed = 0; + if (mRestRF < rfOut) { + mRestRF += rfOut; + ampsUsed = 1; + } + if (((IEnergyReceiver) mTileEntity).receiveEnergy(tDirection, mRestRF, true) > 0) { + int consumed = ((IEnergyReceiver) mTileEntity).receiveEnergy(tDirection, mRestRF, false); + mRestRF -= consumed; + return ampsUsed; + } + if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && + ((IEnergyReceiver) mTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) { + explode(rfOut); + } + return 0; + } + + //copied from IEnergyConnected + private void explode(int aRfOut) { + if (aRfOut > 32L * GregTech_API.mEUtoRF / 100L) { + int aExplosionPower = aRfOut; + float tStrength = + aExplosionPower < V[0] ? 1.0F : + aExplosionPower < V[1] ? 2.0F : + aExplosionPower < V[2] ? 3.0F : + aExplosionPower < V[3] ? 4.0F : + aExplosionPower < V[4] ? 5.0F : + aExplosionPower < V[4] * 2 ? 6.0F : + aExplosionPower < V[5] ? 7.0F : + aExplosionPower < V[6] ? 8.0F : + aExplosionPower < V[7] ? 9.0F : + aExplosionPower < V[8] ? 10.0F : + aExplosionPower < V[8] * 2 ? 11.0F : + aExplosionPower < V[9] ? 12.0F : + aExplosionPower < V[10] ? 13.0F : + aExplosionPower < V[11] ? 14.0F : + aExplosionPower < V[12] ? 15.0F : + aExplosionPower < V[12] * 2 ? 16.0F : + aExplosionPower < V[13] ? 17.0F : + aExplosionPower < V[14] ? 18.0F : + aExplosionPower < V[15] ? 19.0F : 20.0F; + int tX = mTileEntity.xCoord, tY = mTileEntity.yCoord, tZ = mTileEntity.zCoord; + World tWorld = mTileEntity.getWorldObj(); + GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 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), 100000); + + 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 new file mode 100644 index 0000000000..3f93c62010 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java @@ -0,0 +1,28 @@ +package gregtech.api.graphs.consumers; + +import ic2.api.energy.tile.IEnergySink; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.ArrayList; + +//consumer for IC2 machines +public class NodeEnergySink extends ConsumerNode { + public NodeEnergySink(int nodeValue, IEnergySink tileEntity, byte side, ArrayList<ConsumerNode> consumers) { + super(nodeValue, (TileEntity) tileEntity, side, consumers); + } + + @Override + public boolean needsEnergy() { + return super.needsEnergy() && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0; + } + + @Override + public int injectEnergy(int aVoltage, int aMaxAmps) { + int tUsedAmps = 0; + while (aMaxAmps > tUsedAmps && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0 && + ((IEnergySink) mTileEntity).injectEnergy(ForgeDirection.getOrientation(mSide), aVoltage, aVoltage) < aVoltage) + tUsedAmps++; + return tUsedAmps; + } +} diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java b/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java new file mode 100644 index 0000000000..5c54ee16f9 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java @@ -0,0 +1,23 @@ +package gregtech.api.graphs.consumers; + +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) { + super(aNodeValue, aTileEntity, aSide, aConsumers); + } + + @Override + public int injectEnergy(int aVoltage, int aMaxAmps) { + return (int)((IEnergyConnected) mTileEntity).injectEnergyUnits(mSide,aVoltage, aMaxAmps); + } + + @Override + public boolean needsEnergy() { + BaseMetaTileEntity tTileEntity = (BaseMetaTileEntity) mTileEntity; + return super.needsEnergy() && tTileEntity.getStoredEU() < tTileEntity.getEUCapacity(); + } +} diff --git a/src/main/java/gregtech/api/graphs/paths/NodePath.java b/src/main/java/gregtech/api/graphs/paths/NodePath.java new file mode 100644 index 0000000000..ddbd570af3 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/paths/NodePath.java @@ -0,0 +1,29 @@ +package gregtech.api.graphs.paths; + +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.MetaPipeEntity; + +//to contain all info about the path between nodes +public class NodePath { + protected MetaPipeEntity[] mPipes; + + public NodePath(MetaPipeEntity[] aCables) { + this.mPipes = aCables; + processPipes(); + } + + public void clearPath() { + for (int i = 0; i< mPipes.length; i++) { + BaseMetaPipeEntity tBasePipe = (BaseMetaPipeEntity) mPipes[i].getBaseMetaTileEntity(); + if (tBasePipe != null) { + tBasePipe.setNodePath(null); + } + } + } + protected void processPipes() { + for (MetaPipeEntity tPipe : mPipes) { + BaseMetaPipeEntity basePipe = (BaseMetaPipeEntity) tPipe.getBaseMetaTileEntity(); + basePipe.setNodePath(this); + } + } +} diff --git a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java new file mode 100644 index 0000000000..a91f9b10a8 --- /dev/null +++ b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java @@ -0,0 +1,112 @@ +package gregtech.api.graphs.paths; + +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 { + int mMaxAmps; + int mAmps = 0; + int mLoss; + int mVoltage = 0; + int mMaxVoltage; + int mTick = 0; + boolean mCountUp = true; + + + public PowerNodePath(MetaPipeEntity[] aCables) { + super(aCables); + } + + public int getLoss() { + return mLoss; + } + + public void applyVoltage(int aVoltage, boolean aCountUp) { + int tNewTime = MinecraftServer.getServer().getTickCounter(); + if (mTick != tNewTime) { + reset(tNewTime - mTick); + mTick = tNewTime; + this.mVoltage = aVoltage; + this.mCountUp = aCountUp; + } else if (this.mCountUp != aCountUp && (aVoltage - mLoss)> this.mVoltage || aVoltage > this.mVoltage){ + this.mCountUp = aCountUp; + this.mVoltage = aVoltage; + } + if (aVoltage > mMaxVoltage) { + for (MetaPipeEntity tCable : mPipes) { + if (((GT_MetaPipeEntity_Cable)tCable).mVoltage < this.mVoltage) { + BaseMetaPipeEntity tBaseCable = (BaseMetaPipeEntity) tCable.getBaseMetaTileEntity(); + tBaseCable.setToFire(); + } + } + } + } + + public void addAmps(int aAmps) { + this.mAmps += aAmps; + if (this.mAmps > mMaxAmps * 40) { + for (MetaPipeEntity tCable : mPipes) { + if (((GT_MetaPipeEntity_Cable)tCable).mAmperage*40 < this.mAmps) { + BaseMetaPipeEntity tBaseCable = (BaseMetaPipeEntity) tCable.getBaseMetaTileEntity(); + if (tBaseCable != null) + tBaseCable.setToFire(); + } + } + } + } + + //if no amps pass trough for more then 0.5 second reduce them to minimize wrong results + //but still allow the player to see if activity is happening + public int getAmps() { + int tTime = MinecraftServer.getServer().getTickCounter() - 10; + if (mTick < tTime) { + reset(tTime - mTick); + mTick = tTime; + } + return mAmps; + } + + public int getVoltage(MetaPipeEntity aCable) { + int tLoss = 0; + if (mCountUp) { + for (int i = 0; i < mPipes.length; i++) { + GT_MetaPipeEntity_Cable tCable = (GT_MetaPipeEntity_Cable) mPipes[i]; + tLoss += tCable.mCableLossPerMeter; + if (aCable == tCable) { + return Math.max(mVoltage - tLoss, 0); + } + } + } else { + for (int i = mPipes.length - 1; i >= 0; i--) { + GT_MetaPipeEntity_Cable tCable = (GT_MetaPipeEntity_Cable) mPipes[i]; + tLoss += tCable.mCableLossPerMeter; + if (aCable == tCable) { + return Math.max(mVoltage - tLoss, 0); + } + } + } + return -1; + } + + private void reset(int aTimePassed) { + mAmps = Math.max(0, mAmps - (mMaxAmps * aTimePassed)); + } + + @Override + protected void processPipes() { + super.processPipes(); + mMaxAmps = Integer.MAX_VALUE; + mMaxVoltage = Integer.MAX_VALUE; + for (MetaPipeEntity tCable : mPipes) { + if (tCable instanceof GT_MetaPipeEntity_Cable) { + mMaxAmps = Math.min((int)((GT_MetaPipeEntity_Cable) tCable).mAmperage, mMaxAmps); + mLoss += (int)((GT_MetaPipeEntity_Cable) tCable).mCableLossPerMeter; + mMaxVoltage = Math.min((int)((GT_MetaPipeEntity_Cable) tCable).mVoltage, mMaxVoltage); + } + } + } +} diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 4ce583cff5..608c6015d5 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -26,6 +26,7 @@ public class GT_Container extends Container { mTileEntity = aTileEntityInventory; mPlayerInventory = aPlayerInventory; + mTileEntity.openInventory(); } /** @@ -468,6 +469,7 @@ public class GT_Container extends Container { public void onContainerClosed(EntityPlayer par1EntityPlayer) { try { super.onContainerClosed(par1EntityPlayer); + mTileEntity.closeInventory(); } catch (Throwable e) { e.printStackTrace(GT_Log.err); } @@ -556,4 +558,4 @@ public class GT_Container extends Container { } return true; } -}
\ No newline at end of file +} 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 33bdec53e1..5903550a91 100644 --- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java @@ -209,4 +209,4 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { public String trans(String aKey, String aEnglish) { return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); } -}
\ No newline at end of file +} 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 7e14061d2f..28fd2983f4 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -4,11 +4,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; + +import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -179,17 +184,162 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + GT_MetaTileEntity_BasicMachine machine = (GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity(); + if (machine == null) return null; + ItemStack tResultStack; switch (aSlotIndex) { case 0: - if (mTileEntity.getMetaTileEntity() == null) return null; - ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mFluidTransfer = !((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mFluidTransfer; + machine.mFluidTransfer = !machine.mFluidTransfer; return null; case 1: if (mTileEntity.getMetaTileEntity() == null) return null; - ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mItemTransfer = !((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mItemTransfer; + machine.mItemTransfer = !machine.mItemTransfer; return null; + case 2: + if (aMouseclick > 1) + return null; + tResultStack = pickupFluid(machine.getDrainableStack(), aPlayer, aMouseclick == 0); + if (machine.getDrainableStack() != null && machine.getDrainableStack().amount == 0) + machine.setDrainableStack(null); + return tResultStack; default: - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (aSlotIndex == OTHER_SLOT_COUNT + 1 + machine.mInputSlotCount + machine.mOutputItems.length) { + if (aMouseclick > 1) + return null; + // input fluid slot + ItemStack tStackHeld = aPlayer.inventory.getItemStack(); + ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); + if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null; + FluidStack tInputFluid = machine.getFillableStack(); + FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackSizedOne, true); + if (tFluidHeld != null && tFluidHeld.amount <= 0) + tFluidHeld = null; + if (tInputFluid == null) { + if (tFluidHeld == null) + // both null -> no op + return null; + return fillFluid(machine, aPlayer, tFluidHeld, aMouseclick == 0); + } else { + if (tFluidHeld != null && tInputFluid.amount < machine.getCapacity()) { + // both nonnull and have space left for filling. + // actually both pickup and fill is reasonable, but I'll go with fill here + return fillFluid(machine, aPlayer, tFluidHeld, aMouseclick == 0); + } else { + tResultStack = pickupFluid(tInputFluid, aPlayer, aMouseclick == 0); + if (tInputFluid.amount == 0) + machine.setFillableStack(null); + return tResultStack; + } + } + } else { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + } + } + + private ItemStack pickupFluid(FluidStack aTankStack, EntityPlayer aPlayer, boolean aProcessFullStack) { + if (aTankStack == null) return null; + ItemStack tStackHeld = aPlayer.inventory.getItemStack(); + ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); + if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null; + int tOriginalFluidAmount = aTankStack.amount; + ItemStack tFilled = GT_Utility.fillFluidContainer(aTankStack, tStackSizedOne, true, false); + if (tFilled == null && tStackSizedOne.getItem() instanceof IFluidContainerItem) { + IFluidContainerItem tContainerItem = (IFluidContainerItem) tStackSizedOne.getItem(); + int tFilledAmount = tContainerItem.fill(tStackSizedOne, aTankStack, true); + if (tFilledAmount > 0) { + tFilled = tStackSizedOne; + aTankStack.amount -= tFilledAmount; + } + } + if (tFilled != null) { + if (aProcessFullStack) { + int tFilledAmount = tOriginalFluidAmount - aTankStack.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 + */ + int tAdditionalParallel = Math.min(tStackHeld.stackSize - 1, aTankStack.amount / tFilledAmount); + aTankStack.amount -= tFilledAmount * tAdditionalParallel; + tFilled.stackSize += tAdditionalParallel; + } + replaceCursorItemStack(aPlayer, tFilled); + } + return tFilled; + } + + private ItemStack fillFluid(GT_MetaTileEntity_BasicMachine aMachine, 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 (aMachine.getFillableStack() != null && !aMachine.getFillableStack().isFluidEqual(aFluidHeld)) + return null; + ItemStack tStackHeld = aPlayer.inventory.getItemStack(); + ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); + if (tStackSizedOne == null) + return null; + + int tFreeSpace = aMachine.getCapacity() - (aMachine.getFillableStack() != null ? aMachine.getFillableStack().amount : 0); + if (tFreeSpace <= 0) + // no space left + return null; + + // find out how much fluid can be taken + // some cells cannot be partially filled + ItemStack tStackEmptied = null; + int tAmountTaken = 0; + if (tFreeSpace >= aFluidHeld.amount) { + // fully accepted - try take it from item now + // IFluidContainerItem is intentionally not checked here. it will be checked later + tStackEmptied = GT_Utility.getContainerForFilledItem(tStackSizedOne, false); + tAmountTaken = aFluidHeld.amount; + } + if (tStackEmptied == null && tStackSizedOne.getItem() instanceof IFluidContainerItem) { + // either partially accepted, or is IFluidContainerItem + IFluidContainerItem container = (IFluidContainerItem) tStackSizedOne.getItem(); + FluidStack tDrained = container.drain(tStackSizedOne, tFreeSpace, true); + if (tDrained != null && tDrained.amount > 0) { + // something is actually drained - change the cell and drop it to player + tStackEmptied = tStackSizedOne; + tAmountTaken = tDrained.amount; + } + } + if (tStackEmptied == null) + // somehow the cell refuse to give out that amount of fluid, no op then + return null; + + // find out how many fill can we do + // same round down behavior as above + // however here the fluid stack is not changed at all, so the exact code will slightly differ + int tParallel = aProcessFullStack ? Math.min(tFreeSpace / tAmountTaken, tStackHeld.stackSize) : 1; + if (aMachine.getFillableStack() == null) { + FluidStack tNewFillableStack = aFluidHeld.copy(); + tNewFillableStack.amount = tAmountTaken * tParallel; + aMachine.setFillableStack(tNewFillableStack); + } else { + aMachine.getFillableStack().amount += tAmountTaken * tParallel; + } + tStackEmptied.stackSize = tParallel; + replaceCursorItemStack(aPlayer, tStackEmptied); + return tStackEmptied; + } + + private void replaceCursorItemStack(EntityPlayer aPlayer, ItemStack tStackResult) { + int tStackResultMaxStackSize = tStackResult.getMaxStackSize(); + while (tStackResult.stackSize > tStackResultMaxStackSize) { + aPlayer.inventory.getItemStack().stackSize -= tStackResultMaxStackSize; + GT_Utility.addItemToPlayerInventory(aPlayer, tStackResult.splitStack(tStackResultMaxStackSize)); + } + if (aPlayer.inventory.getItemStack().stackSize == tStackResult.stackSize) { + // every cell is mutated. it could just stay on the cursor. + aPlayer.inventory.setItemStack(tStackResult); + } else { + // some cells not mutated. The mutated cells must go into the inventory + // or drop into the world if there isn't enough space. + ItemStack tStackHeld = aPlayer.inventory.getItemStack(); + tStackHeld.stackSize -= tStackResult.stackSize; + GT_Utility.addItemToPlayerInventory(aPlayer, tStackResult); } } diff --git a/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java b/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java index c8a70e71f2..c3758486ba 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java +++ b/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java @@ -29,4 +29,4 @@ public class GT_Container_MaintenanceHatch extends GT_ContainerMetaTile_Machine } return null; } -}
\ No newline at end of file +} 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 532ce85146..a54aa2e526 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java @@ -38,4 +38,4 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer { } else GL11.glColor3ub((byte) 255, (byte) 255, (byte) 255); } -}
\ No newline at end of file +} 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 3bb802fcf7..bd28bb11e9 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java @@ -1,6 +1,7 @@ package gregtech.api.gui; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import net.minecraft.entity.player.InventoryPlayer; import java.util.ArrayList; @@ -23,6 +24,8 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin public final byte mProgressBarDirection, mProgressBarAmount; + public final boolean + mRenderAutoOutputSlots; public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI) { this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1); @@ -34,12 +37,15 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); mName = aName; mNEI = aNEI; + mRenderAutoOutputSlots = !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_BasicMachine_Bronze); } @Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); - drawTooltip(par1, par2); + if (mRenderAutoOutputSlots){ + drawTooltip(par1, par2); + } } @Override @@ -72,10 +78,12 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin int y = (height - ySize) / 2; drawTexturedModalRect(x, y, 0, 0, xSize, ySize); if (mContainer != null) { - if (((GT_Container_BasicMachine) mContainer).mFluidTransfer) - drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); - if (((GT_Container_BasicMachine) mContainer).mItemTransfer) - drawTexturedModalRect(x + 25, y + 62, 176, 36, 18, 18); + if (mRenderAutoOutputSlots){ + if (((GT_Container_BasicMachine) mContainer).mFluidTransfer) + drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); + if (((GT_Container_BasicMachine) mContainer).mItemTransfer) + drawTexturedModalRect(x + 25, y + 62, 176, 36, 18, 18); + } if (((GT_Container_BasicMachine) mContainer).mStuttering) drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18); @@ -115,4 +123,4 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin } } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/gui/GT_GUICover.java b/src/main/java/gregtech/api/gui/GT_GUICover.java index f1232c9432..2e9d082ebf 100644 --- a/src/main/java/gregtech/api/gui/GT_GUICover.java +++ b/src/main/java/gregtech/api/gui/GT_GUICover.java @@ -154,6 +154,7 @@ public abstract class GT_GUICover extends GuiScreen implements GT_IToolTipRender } } + @Override public void mouseClicked(int x, int y, int button) { for (GT_GuiIntegerTextBox tBox : textBoxes) { boolean hadFocus = tBox.isFocused(); @@ -195,7 +196,7 @@ public abstract class GT_GUICover extends GuiScreen implements GT_IToolTipRender return; } } - if (textBoxes.size() > 0 ) + if (!textBoxes.isEmpty()) setFocusedTextBox(textBoxes.get(0)); return; } @@ -226,15 +227,19 @@ public abstract class GT_GUICover extends GuiScreen implements GT_IToolTipRender * Button */ + @Override public void actionPerformed(GuiButton button) { selectedButton = button; } + @Override public void clearSelectedButton() { selectedButton = null; } + @Override public GuiButton getSelectedButton(){return selectedButton;} + @Override public void buttonClicked(GuiButton button) { } @@ -247,10 +252,17 @@ public abstract class GT_GUICover extends GuiScreen implements GT_IToolTipRender textBox.setFocused(textBox.equals(boxToFocus) && textBox.isEnabled()); } } + + /** + * Given textbox's value might have changed. + */ public void applyTextBox(GT_GuiIntegerTextBox box) { } + /** + * Reset the given textbox to the last valid value, <b>NOT</b> 0. + */ public void resetTextBox(GT_GuiIntegerTextBox box) { } @@ -295,6 +307,7 @@ public abstract class GT_GUICover extends GuiScreen implements GT_IToolTipRender return gui_height; } + @Override public RenderItem getItemRenderer() { return itemRender; } 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 28b4d2828c..ae30f3a5bb 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java @@ -14,4 +14,4 @@ public class GT_Slot_DataOrb extends Slot { public boolean isItemValid(ItemStack aStack) { return ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); } -}
\ No newline at end of file +} 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 92927e284e..270c758536 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Render.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Render.java @@ -19,4 +19,4 @@ public class GT_Slot_Render extends GT_Slot_Holo { } onSlotChanged(); } -}
\ No newline at end of file +} 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 e081c4227d..91f611b9b6 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java @@ -27,6 +27,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen gui.addElement(this); } + @Override public void onInit() { if (tooltip != null) gui.addToolTip(tooltip); @@ -39,6 +40,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen drawButton(Minecraft.getMinecraft(), mouseX, mouseY); } + @Override public void drawButton(Minecraft mc, int mouseX, int mouseY) { if (this.tooltip != null) this.tooltip.enabled = 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 4e6fd86f55..010ac78654 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java @@ -12,6 +12,7 @@ public class GT_GuiIconCheckButton extends GT_GuiIconButton { this.normalIcon = normalIcon; } + @Override public GT_GuiIcon getButtonTexture(boolean mouseOver) { if (!enabled) return GT_GuiIcon.BUTTON_DISABLED; diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java new file mode 100644 index 0000000000..7949ae90ce --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -0,0 +1,8 @@ +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 8957f3bbbc..50f6cce5d9 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java +++ b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java @@ -5,4 +5,4 @@ import net.minecraft.world.World; public interface IBlockOnWalkOver { void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java index 3fb47251c7..b29b960650 100644 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ b/src/main/java/gregtech/api/interfaces/ICondition.java @@ -101,4 +101,4 @@ public interface ICondition<O> { return mCondition1.isTrue(aObject) == mCondition2.isTrue(aObject); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IDamagableItem.java b/src/main/java/gregtech/api/interfaces/IDamagableItem.java index 37bb9a2794..b360556aa3 100644 --- a/src/main/java/gregtech/api/interfaces/IDamagableItem.java +++ b/src/main/java/gregtech/api/interfaces/IDamagableItem.java @@ -4,4 +4,4 @@ import net.minecraft.item.ItemStack; public interface IDamagableItem { boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index dd72b4d71e..35ca68336e 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -24,4 +24,4 @@ public interface IDebugableBlock { * @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); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IFoodStat.java b/src/main/java/gregtech/api/interfaces/IFoodStat.java index eec89795fd..4f4c696e12 100644 --- a/src/main/java/gregtech/api/interfaces/IFoodStat.java +++ b/src/main/java/gregtech/api/interfaces/IFoodStat.java @@ -32,4 +32,4 @@ public interface IFoodStat { EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack); void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java new file mode 100644 index 0000000000..dc844b8a85 --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java @@ -0,0 +1,5 @@ +package gregtech.api.interfaces; + +public interface IHasFluidDisplayItem { + void updateFluidDisplayItem(); +} diff --git a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java new file mode 100644 index 0000000000..c8ceccf941 --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java @@ -0,0 +1,18 @@ +package gregtech.api.interfaces; + +import gregtech.api.enums.HeatingCoilLevel; +import net.minecraft.item.ItemStack; + +import java.util.function.Consumer; + +public interface IHeatingCoil { + + HeatingCoilLevel getCoilHeat(int meta); + default HeatingCoilLevel getCoilHeat(ItemStack stack) { + return getCoilHeat(stack.getItemDamage()); + } + + void setOnCoilCheck(Consumer<IHeatingCoil> callback); + Consumer<IHeatingCoil> getOnCoilCheck(); +} + diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 32d0c0948a..85916ae0d7 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -37,4 +37,4 @@ public interface IItemBehaviour<E extends Item> { 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); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IItemContainer.java b/src/main/java/gregtech/api/interfaces/IItemContainer.java index 7ce2ad7403..36363b8da1 100644 --- a/src/main/java/gregtech/api/interfaces/IItemContainer.java +++ b/src/main/java/gregtech/api/interfaces/IItemContainer.java @@ -36,4 +36,4 @@ public interface IItemContainer { ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); boolean hasBeenSet(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java index d10c34ef51..322586dc90 100644 --- a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java +++ b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java @@ -13,4 +13,4 @@ public interface IOreRecipeRegistrator { * @param aStack always != null */ void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 6e58d54823..913339ef05 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -21,4 +21,4 @@ public interface IProjectileItem { * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java index 92e4af0469..e067579a1d 100644 --- a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java +++ b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java @@ -17,4 +17,4 @@ public interface ISubTagContainer { * @return if the Tag was there before it has been removed. */ boolean remove(SubTag aTag); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index 9d08713281..4c0b1984ca 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -2,6 +2,7 @@ package gregtech.api.interfaces; import net.minecraft.block.Block; 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); @@ -17,4 +18,35 @@ public interface ITexture { void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); boolean isValidTexture(); -}
\ No newline at end of file + + /** + * @return {@code true} if this texture is from the old package + */ + default boolean isOldTexture() { + return getClass().toString().startsWith("gregtech.api.objects"); + } + + /** + * 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 + */ + default void startDrawingQuads(RenderBlocks aRenderer, float aNormalX, float aNormalY, float aNormalZ) { + if (aRenderer.useInventoryTint) { + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(aNormalX, aNormalY, aNormalZ); + } + } + + /** + * Will run the {@link Tessellator} to draw Quads if rendering off-world (Inventory) + * @param aRenderer The {@link RenderBlocks} Renderer + */ + default void draw(RenderBlocks aRenderer) { + if (aRenderer.useInventoryTint) { + Tessellator.instance.draw(); + } + } +} diff --git a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java new file mode 100644 index 0000000000..8a4d715ccb --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java @@ -0,0 +1,72 @@ +package gregtech.api.interfaces; + +import gregtech.api.render.TextureFactory; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * <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} + * + * @return The built {@link ITexture} + */ + ITexture build(); + + /** + * @param block The {@link 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> + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder setFromSide(final ForgeDirection side); + + /** + * @param iconContainers The {@link IIconContainer}s to add + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder addIcon(final IIconContainer... iconContainers); + + /** + * @param rgba The RGBA tint for this {@link ITexture} + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder setRGBA(final short[] rgba); + + /** + * @param iTextures The {@link ITexture} layers to add + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder addLayer(final ITexture... iTextures); + + /** + * Set alpha blending + * @param allowAlpha to set + * + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder setAllowAlpha(final boolean allowAlpha); + + /** + * Texture will render with same orientation as with vanilla blocks + * + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder stdOrient(); + + /** + * Texture always render with full brightness to glow in the dark + * + * @return {@link ITextureBuilder} for chaining + */ + ITextureBuilder glow(); +} diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index d282c02b11..a96e12c1ce 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -160,4 +160,4 @@ 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); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java index 7eee5ce98f..dd73ffc1e7 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java @@ -5,4 +5,4 @@ package gregtech.api.interfaces.internal; */ public interface IBCTileEntity /*extends IPowerReceptor*/ { // -}
\ No newline at end of file +} 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 ff7b255f0e..22947b746d 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java @@ -43,4 +43,4 @@ public interface IGT_Mod { * Plays the Sonictron Sound for the ItemStack on the Client Side */ void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ); -}
\ No newline at end of file +} 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 c7288cc26e..e09c192bfa 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -171,17 +171,17 @@ public interface IGT_RecipeAdder { 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 aFluidOutputs fluid outputs - * + * @param aOutputs item outputs - * + * @param aDuration must be > 0 - * + * @param aEUtick must be > 0 - * + * aInputs and aFluidInputs must contain at least one valid input. - * + * aOutputs and aFluidOutputs must contain at least one valid output. - * + + * Adds a Chemical Recipe that only exists in the Large Chemical Reactor + * + * @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. + * */ boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick); @@ -275,13 +275,13 @@ public interface IGT_RecipeAdder { boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); /** - * + * Adds an Assembler Recipe - * + * - * + * @param aInputs must be != null - * + * @param aOutput1 must be != null - * + * @param aDuration must be > 0 - * + * @param aEUt should be > 0 - * + + * Adds an Assembler Recipe + * + * @param aInputs must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + * */ boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); @@ -610,10 +610,13 @@ public interface IGT_RecipeAdder { boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); + boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); + boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); + /** * Adds a Recipe for the Mixer */ diff --git a/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java index 05208d36a4..7592ffbe1a 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IIC2TileEntity.java @@ -10,4 +10,4 @@ import ic2.api.tile.IEnergyStorage; */ public interface IIC2TileEntity extends IEnergyStorage, IEnergySink, IEnergySource, IHasWorldObjectAndCoords { // -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java index c4f416c823..13a3aba523 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java +++ b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java @@ -53,4 +53,4 @@ public interface IThaumcraftCompat { 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); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java index d183961a0d..b62740f610 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java @@ -3,4 +3,4 @@ package gregtech.api.interfaces.internal; public interface IUETileEntity /*extends IElectrical*/ { // -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index bc822250fd..cffcb4c4ab 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -4,6 +4,18 @@ package gregtech.api.interfaces.metatileentity; * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. */ public interface IConnectable { + int NO_CONNECTION = 0b00000000; + int CONNECTED_DOWN = 0b00000001; + int CONNECTED_UP = 0b00000010; + int CONNECTED_NORTH = 0b00000100; + int CONNECTED_SOUTH = 0b00001000; + int CONNECTED_WEST = 0b00010000; + int CONNECTED_EAST = 0b00100000; + int CONNECTED_ALL = 0b00111111; + int HAS_FRESHFOAM = 0b01000000; + int HAS_HARDENEDFOAM = 0b10000000; + 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. diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java index 9306ef28f3..f67fb0f600 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java @@ -4,4 +4,4 @@ public interface IMachineCallback<Machinetype extends IMetaTileEntity> { Machinetype getCallbackBase(); void setCallbackBase(Machinetype callback); Class<Machinetype> getType(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index f0ca426616..2bf61f6679 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -422,4 +422,5 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand default boolean isMachineBlockUpdateRecursive(){ return true; } + } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java index a7c1209d24..85237ac4f4 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java @@ -12,4 +12,4 @@ public interface IMetaTileEntityCable extends IMetaTileEntity { default long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { return transferElectricity(aSide, aVoltage, aAmperage, new ArrayList<>(aAlreadyPassedSet)); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java index b795c793bc..6998556fd0 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java @@ -97,4 +97,4 @@ public interface IBasicEnergyContainer extends IEnergyConnected { * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits */ boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java index 76d121b8da..560d47c595 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java @@ -46,4 +46,4 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn * Receiving a packet with cover data. */ void receiveCoverData(byte coverSide, int coverID, int coverData); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java index d7c39c900c..9d19e7cef0 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDigitalChest.java @@ -28,4 +28,4 @@ public interface IDigitalChest extends IHasWorldObjectAndCoords { * 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(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java index 32fd276600..5a35e1ea52 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConductor.java @@ -37,4 +37,4 @@ public interface IEnergyConductor extends IEnergyConnected { * @return the Material the Cable Insulation consists of. (may return Materials._NULL) */ Materials getInsulationMaterial(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 47bec844ee..24d0576864 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -4,6 +4,7 @@ import cofh.api.energy.IEnergyReceiver; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; import ic2.api.energy.tile.IEnergySink; import net.minecraft.init.Blocks; @@ -60,7 +61,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd */ public static final long emitEnergyToNetwork(long aVoltage, long aAmperage, IEnergyConnected aEmitter) { long rUsedAmperes = 0; - for (byte i = 0, j = 0; i < 6 && aAmperage > rUsedAmperes; i++) + for (byte i = 0, j = 0; i < 6 && aAmperage > rUsedAmperes; i++) { if (aEmitter.outputsEnergyTo(i)) { j = GT_Utility.getOppositeSide(i); TileEntity tTileEntity = aEmitter.getTileEntityAtSide(i); @@ -70,6 +71,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd if (tColor >= 0 && tColor != aEmitter.getColorization()) continue; } rUsedAmperes += ((IEnergyConnected) tTileEntity).injectEnergyUnits(j, aVoltage, aAmperage - rUsedAmperes); + } else if (tTileEntity instanceof IEnergySink) { if (((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { while (aAmperage > rUsedAmperes && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) tTileEntity).injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) < aVoltage) @@ -112,11 +114,18 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd if (GregTech_API.sMachineExplosions) if (GT_Mod.gregtechproxy.mPollution) GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), 100000); - tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); + + new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() + .setStrength(tStrength) + .setSmoking(true) + .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5) + .setWorld(tWorld) + .run(); } } } } + } return rUsedAmperes; } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java index 3a32a557fb..2a8172a775 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java @@ -90,4 +90,4 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW return rUsedSecondary; } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java index bde86524c5..713fe73f22 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IFibreConnected.java @@ -28,4 +28,4 @@ public interface IFibreConnected extends IColoredTileEntity, IHasWorldObjectAndC * Gets the Signal this Blocks receives from this Fibre Color */ byte getFibreInput(byte aSide, byte aColor); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java index 39c779e69c..221e290220 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechDeviceInformation.java @@ -18,4 +18,4 @@ public interface IGregTechDeviceInformation { * @return an Array of Information Strings. Don't return null! */ String[] getInfoData(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java index 8e135fbc85..cf002d9e95 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java @@ -141,8 +141,7 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil */ @Override default void onMachineBlockUpdate(){ - if(!isDead() && getMetaTileEntity()!=null && - getMetaTileEntity().getBaseMetaTileEntity()==this){ + if(!isDead() && getMetaTileEntity() != null && getMetaTileEntity().getBaseMetaTileEntity() == this){ getMetaTileEntity().onMachineBlockUpdate(); } } @@ -152,8 +151,10 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil */ @Override default boolean isMachineBlockUpdateRecursive() { - return !isDead() && getMetaTileEntity()!=null && - getMetaTileEntity().getBaseMetaTileEntity()==this && + return !isDead() && getMetaTileEntity() != null && + getMetaTileEntity().getBaseMetaTileEntity() == this && getMetaTileEntity().isMachineBlockUpdateRecursive(); } -}
\ No newline at end of file + + default void setShutdownStatus(boolean newStatus) {return;} +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java index 42df520ff4..437d896800 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasInventory.java @@ -30,4 +30,4 @@ public interface IHasInventory extends ISidedInventory, IHasWorldObjectAndCoords * @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); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java index 9b7489cf00..f367b7c073 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java @@ -166,4 +166,4 @@ public interface IHasWorldObjectAndCoords { * Opens the GUI with the ID = 0 of this TileEntity */ boolean openGUI(EntityPlayer aPlayer); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java index 588158d16c..f5eeaf9318 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java @@ -66,4 +66,12 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { * sets the visible Active Status of the Machine */ void setActive(boolean aActive); -}
\ No newline at end of file + + /** + * 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 909f4077f0..c7590e98ed 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IPipeRenderedTileEntity.java @@ -8,4 +8,8 @@ public interface IPipeRenderedTileEntity extends ICoverable, ITexturedTileEntity byte getConnections(); ITexture[] getTextureUncovered(byte aSide); -}
\ No newline at end of file + + default ITexture[] getTextureCovered(byte aSide) { + return getTextureUncovered(aSide); + } +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java index 5be185b4a3..f9fff116f4 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneEmitter.java @@ -34,4 +34,4 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords { * Gets the Output for the comparator on the given Side */ byte getComparatorValue(byte aSide); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java index 8c644be2e6..acee525137 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneReceiver.java @@ -26,4 +26,4 @@ public interface IRedstoneReceiver extends IHasWorldObjectAndCoords { * gets if the TileEntity receives Redstone at this Side */ boolean getRedstone(byte aSide); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java index 6100572a7d..452699a172 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IRedstoneTileEntity.java @@ -14,4 +14,4 @@ public interface IRedstoneTileEntity extends IRedstoneEmitter, IRedstoneReceiver * Sends nothing to Client, just causes a Block Update. */ void issueBlockUpdate(); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java index b16ae65548..fd1600903e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITexturedTileEntity.java @@ -8,4 +8,4 @@ public interface ITexturedTileEntity { * @return the Textures rendered by the GT Rendering */ ITexture[] getTexture(Block aBlock, byte aSide); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java index dca9c5ce0b..94888cdfb8 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java @@ -30,4 +30,4 @@ public interface ITurnable { * Determine if the wrench can be used to set the block's facing. */ boolean isValidFacing(byte aSide); -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java b/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java new file mode 100644 index 0000000000..12d69cd0ec --- /dev/null +++ b/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java @@ -0,0 +1,130 @@ +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 net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import java.util.List; +import java.util.Random; + +public class GT_Block_LongDistancePipe extends GT_Generic_Block { + public IIconContainer[] mIcons; + public GT_Block_LongDistancePipe() { + super(GT_Item_LongDistancePipe.class, "gt.block.longdistancepipe", new GT_Material_Machines()); + setStepSound(soundTypeMetal); + setCreativeTab(GregTech_API.TAB_GREGTECH); + GregTech_API.registerMachineBlock(this, -1); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName()+".0.name", "Long Distance Fluid Pipeline Pipe"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName()+".1.name", "Long Distance Item Pipeline Pipe"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); + + ItemList.Long_Distance_Pipeline_Fluid_Pipe.set(new ItemStack(this, 1, 0)); + ItemList.Long_Distance_Pipeline_Item_Pipe.set(new ItemStack(this, 1, 1)); + mIcons = new IIconContainer[]{Textures.BlockIcons.LONG_DISTANCE_PIPE_FLUID, Textures.BlockIcons.LONG_DISTANCE_PIPE_ITEM}; + } + @Override + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + super.onBlockAdded(aWorld, aX, aY, aZ); + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + @Override + public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + super.breakBlock(aWorld, aX, aY, aZ, par5, par6); + } + @Override + public String getHarvestTool(int aMeta) { + return "wrench"; + } + + @Override + public int getHarvestLevel(int aMeta) { + return 2; + } + + @Override + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ); + } + + @Override + public float getExplosionResistance(Entity aTNT) { + return Blocks.iron_block.getExplosionResistance(aTNT); + } + + + @Override + public String getUnlocalizedName() { + return this.mUnlocalizedName; + } + + @Override + public String getLocalizedName() { + return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + return mIcons[aMeta % mIcons.length].getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) { + } + + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } + + @Override + public int quantityDropped(Random par1Random) { + return 1; + } + + @Override + public Item getItemDropped(int par1, Random par2Random, int par3) { + return Item.getItemFromBlock(this); + } + + @Override + public int damageDropped(int par1) { + return par1; + } + + @Override + public int getDamageValue(World par1World, int par2, int par3, int par4) { + return par1World.getBlockMetadata(par2, par3, par4); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i < 3; i++) { + ItemStack aStack = new ItemStack(aItem, 1, i); + if (!aStack.getDisplayName().contains(".name")) aList.add(aStack); + } + } +} 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 0d8c9a673a..106897efd7 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java @@ -12,13 +12,16 @@ public class GT_CoolantCellIC_Item super(aUnlocalized, aEnglish, aMaxStore); } + @Override 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) { return false; } + @Override public boolean canStoreHeat(IReactor aReactor, ItemStack aStack, int x, int y) { if (aReactor.isFluidCooled() && (getControlTagOfStack(aStack)) != 0) { return false; @@ -26,18 +29,22 @@ public class GT_CoolantCellIC_Item return true; } + @Override public int getMaxHeat(IReactor aReactor, ItemStack aStack, int x, int y) { return this.heatStorage; } + @Override public int getCurrentHeat(IReactor aReactor, ItemStack aStack, int x, int y) { return getHeatOfStack(aStack); } + @Override public float influenceExplosion(IReactor aReactor, ItemStack aStack) { return 1.0F + this.heatStorage / 30000.0F; } + @Override public int alterHeat(IReactor aReactor, ItemStack aStack, int x, int y, int aHeat) { int tHeat = getHeatOfStack(aStack); if ((tHeat == 0) && (getControlTagOfStack(aStack) != 0)) { 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 043a835fd5..142737a528 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java @@ -49,6 +49,7 @@ public class GT_CoolantCell_Item } } + @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); int rHeat = getHeatOfStack(aStack) * 10 / this.heatStorage; 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 2882ece1fa..37d1e0c7d5 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Block.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Block.java @@ -17,4 +17,4 @@ public class GT_Generic_Block extends Block { GameRegistry.registerBlock(this, aItemClass, getUnlocalizedName()); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + W + ".name", "Any Sub Block of this one"); } -}
\ No newline at end of file +} 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 70e5d23d5c..f25eb73e87 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Item.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Item.java @@ -159,4 +159,4 @@ public class GT_Generic_Item extends Item implements IProjectileItem { return null; } } -}
\ No newline at end of file +} 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 95a6e124b1..0a223a04f6 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java @@ -358,4 +358,4 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) { return false; } -}
\ No newline at end of file +} 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 559c2b2fdc..f9f54b5219 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 @@ -188,4 +188,4 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) { return false; } -}
\ No newline at end of file +} 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 b4ecdca49b..9f35b0c0d2 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 @@ -195,4 +195,4 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { return Math.min(super.getItemStackLimit(aStack), mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize); return super.getItemStackLimit(aStack); } -}
\ No newline at end of file +} 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 24dcc8ef5e..e24ed04539 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -44,6 +44,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement return 0; } + @Override public void processChamber(IReactor reactor, ItemStack yourStack, int x, int y, boolean heatrun) { if (!reactor.produceEnergy()) { return; @@ -110,6 +111,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement } } + @Override public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) { if (!heatrun) { if(sMox){ @@ -122,26 +124,32 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement return true; } + @Override public boolean canStoreHeat(IReactor reactor, ItemStack yourStack, int x, int y) { return false; } + @Override public int getMaxHeat(IReactor reactor, ItemStack yourStack, int x, int y) { return 0; } + @Override public int getCurrentHeat(IReactor reactor, ItemStack yourStack, int x, int y) { return 0; } + @Override public int alterHeat(IReactor reactor, ItemStack yourStack, int x, int y, int heat) { return heat; } + @Override public float influenceExplosion(IReactor reactor, ItemStack yourStack) { return 2 * this.numberOfCells; } + @Override public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isCurrentItem) { if (this.sRadiation > 0 && (entity instanceof EntityLivingBase)) { EntityLivingBase entityLiving = (EntityLivingBase) entity; 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 78c0fb85a1..3bdaf22f37 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java @@ -92,6 +92,7 @@ public class GT_RadioactiveCell_Item return 0; } + @Override public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { return false; } @@ -138,6 +139,7 @@ public class GT_RadioactiveCell_Item setDamageForStack(stack, getDamageOfStack(stack) + Dmg); } + @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); //aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs"); 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 3273d13854..7725785276 100644 --- a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java +++ b/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java @@ -37,4 +37,4 @@ public class GT_SolderingTool_Item extends GT_Tool_Item { } return false; } -}
\ No newline at end of file +} 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 4bcded8fa1..75d4dc3e80 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 @@ -64,4 +64,4 @@ public class GT_Spray_Bug_Item extends GT_Tool_Item { return false; } -}
\ No newline at end of file +} 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 afd964f3d6..76339b9886 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 @@ -168,4 +168,4 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } return false; } -}
\ No newline at end of file +} 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 926bcc60dc..ae2bb27d77 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 @@ -68,4 +68,4 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { return false; } -}
\ No newline at end of file +} 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 cb3368b683..2f6132261b 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 @@ -50,4 +50,4 @@ public class GT_Spray_Hydration_Item extends GT_Tool_Item { return false; } -}
\ No newline at end of file +} 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 dfc43906a0..400f183cbb 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 @@ -78,4 +78,4 @@ public class GT_Spray_Ice_Item extends GT_Tool_Item { } return false; } -}
\ No newline at end of file +} 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 db289ef240..890ce9e8e9 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 @@ -48,4 +48,4 @@ public class GT_Spray_Pepper_Item extends GT_Tool_Item { return false; } -}
\ No newline at end of file +} 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 c66703497e..aa53ddaba1 100644 --- a/src/main/java/gregtech/api/items/GT_Tool_Item.java +++ b/src/main/java/gregtech/api/items/GT_Tool_Item.java @@ -22,4 +22,4 @@ public class GT_Tool_Item extends GT_Generic_Item { setFull3D(); GT_ModHandler.registerBoxableItemToToolBox(this); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 6025e7eb13..b51377550b 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -8,9 +8,14 @@ import java.util.Arrays; import java.util.List; import java.util.UUID; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.graphs.Node; +import gregtech.api.graphs.paths.NodePath; import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IConnectable; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity; @@ -21,6 +26,7 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Client; import gregtech.common.covers.GT_Cover_Fluidfilter; import net.minecraft.block.Block; import net.minecraft.entity.Entity; @@ -48,7 +54,7 @@ import net.minecraftforge.fluids.IFluidHandler; */ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileEntity, IPipeRenderedTileEntity { private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[]{GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior}; - public byte mConnections = 0; + public byte mConnections = IConnectable.NO_CONNECTION; protected MetaPipeEntity mMetaTileEntity; private byte[] mSidedRedstone = new byte[]{0, 0, 0, 0, 0, 0}; private int[] mCoverSides = new int[]{0, 0, 0, 0, 0, 0}, mCoverData = new int[]{0, 0, 0, 0, 0, 0}, mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; @@ -58,6 +64,25 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE private int oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0; private short mID = 0; private long mTickTimer = 0; + protected Node node; + protected NodePath nodePath; + + public Node getNode() { + return node; + } + + public void setNode(Node node) { + this.node = node; + } + + public NodePath getNodePath() { + return nodePath; + } + + public void setNodePath(NodePath nodePath) { + this.nodePath = nodePath; + } + public BaseMetaPipeEntity() { } @@ -258,10 +283,15 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE if (!hasValidMetaTileEntity()) return; } } - mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63)); - if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) { - mConnections = (byte) ((mConnections & ~64) | -128); + byte oldConnections = mConnections; + // Mask-out connection direction bits to keep only Foam related connections + mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~IConnectable.CONNECTED_ALL)); + // If foam not hardened, tries roll chance to harden + if ((mConnections & IConnectable.HAS_FOAM) == IConnectable.HAS_FRESHFOAM && getRandomNumber(1000) == 0) { + mConnections = (byte) ((mConnections & ~IConnectable.HAS_FRESHFOAM) | IConnectable.HAS_HARDENEDFOAM); } + if (mTickTimer > 12 && oldConnections != mConnections) + GregTech_API.causeCableUpdate(worldObj,xCoord,yCoord,zCoord); } case 8: tCode = 9; @@ -484,6 +514,10 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE } public ITexture getCoverTexture(byte aSide) { + if (getCoverIDAtSide(aSide) == 0) return null; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) { + return BlockIcons.HIDDEN_TEXTURE[0]; // See through + } return GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide))); } @@ -784,16 +818,32 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE } @Override + public ITexture[] getTextureCovered(byte aSide) { + ITexture coverTexture = getCoverTexture(aSide); + ITexture[] textureUncovered = getTextureUncovered(aSide); + ITexture[] textureCovered; + if (coverTexture != null) { + textureCovered = Arrays.copyOf(textureUncovered, textureUncovered.length + 1); + textureCovered[textureUncovered.length] = coverTexture; + return textureCovered; + } else { + return textureUncovered; + } + } + + @Override public ITexture[] getTextureUncovered(byte aSide) { - if ((mConnections & 64) != 0) return Textures.BlockIcons.FRESHFOAM; - if ((mConnections & -128) != 0) return Textures.BlockIcons.HARDENEDFOAMS[mColor]; - if ((mConnections & -64) != 0) return Textures.BlockIcons.ERROR_RENDERING; + if ((mConnections & IConnectable.HAS_FRESHFOAM) != 0) return Textures.BlockIcons.FRESHFOAM; + if ((mConnections & IConnectable.HAS_HARDENEDFOAM) != 0) return Textures.BlockIcons.HARDENEDFOAMS[mColor]; + if ((mConnections & IConnectable.HAS_FOAM) != 0) return Textures.BlockIcons.ERROR_RENDERING; byte tConnections = mConnections; - if (tConnections == 1 || tConnections == 2) tConnections = 3; - else if (tConnections == 4 || tConnections == 8) tConnections = 12; - else if (tConnections == 16 || tConnections == 32) tConnections = 48; + if (tConnections == IConnectable.CONNECTED_WEST || tConnections == IConnectable.CONNECTED_EAST) tConnections = (byte) (IConnectable.CONNECTED_WEST | IConnectable.CONNECTED_EAST); + else if (tConnections == IConnectable.CONNECTED_DOWN || tConnections == IConnectable.CONNECTED_UP) tConnections = (byte) (IConnectable.CONNECTED_DOWN | IConnectable.CONNECTED_UP); + else if (tConnections == IConnectable.CONNECTED_NORTH || tConnections == IConnectable.CONNECTED_SOUTH) tConnections = (byte) (IConnectable.CONNECTED_NORTH | IConnectable.CONNECTED_SOUTH); if (hasValidMetaTileEntity()) - return mMetaTileEntity.getTexture(this, aSide, tConnections, (byte) (mColor - 1), tConnections == 0 || (tConnections & (1 << aSide)) != 0, getOutputRedstoneSignal(aSide) > 0); + return mMetaTileEntity.getTexture(this, aSide, tConnections, (byte) (mColor - 1), + tConnections == 0 || (tConnections & (1 << aSide)) != 0, + getOutputRedstoneSignal(aSide) > 0); return Textures.BlockIcons.ERROR_RENDERING; } @@ -1387,7 +1437,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE @Override public float getBlastResistance(byte aSide) { - return (mConnections & 192) != 0 ? 50.0F : 5.0F; + return (mConnections & IConnectable.HAS_FOAM) != 0 ? 50.0F : 5.0F; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index cfb34eb34e..341e7d5714 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1,9 +1,22 @@ package gregtech.api.metatileentity; +import appeng.api.networking.IGridNode; +import appeng.api.networking.security.IActionHost; +import appeng.api.util.AECableType; +import appeng.api.util.DimensionalCoord; +import appeng.me.helpers.AENetworkProxy; +import appeng.me.helpers.IGridProxyable; +import appeng.tile.TileEvent; +import appeng.tile.events.TileEventType; +import cpw.mods.fml.common.Optional; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.graphs.GenerateNodeMap; +import gregtech.api.graphs.GenerateNodeMapPower; +import gregtech.api.graphs.Node; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IEnergyConnected; @@ -12,7 +25,12 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.net.GT_Packet_TileEntity; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.*; +import gregtech.api.util.GT_CoverBehavior; +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 gregtech.common.GT_Client; import gregtech.common.GT_Pollution; import ic2.api.Direction; import net.minecraft.block.Block; @@ -25,6 +43,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; +import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; @@ -51,7 +70,10 @@ import static gregtech.api.objects.XSTR.XSTR_INSTANCE; * <p/> * This is the main TileEntity for EVERYTHING. */ -public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileEntity { +@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 BaseTileEntity implements IGregTechTileEntity, IActionHost, IGridProxyable { private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[]{GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior}; protected MetaTileEntity mMetaTileEntity; protected long mStoredEnergy = 0, mStoredSteam = 0; @@ -72,6 +94,9 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE private String mOwnerName = ""; private UUID mOwnerUuid = GT_Utility.defaultUuid; private NBTTagCompound mRecipeStuff = new NBTTagCompound(); + private int cableUpdateDelay = 30; + + public boolean mWasShutdown = false; private static final Field ENTITY_ITEM_HEALTH_FIELD; static @@ -548,6 +573,12 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE case 15: tCode++; if (aSideServer) { + if (mTickTimer > 20 && cableUpdateDelay == 0) { + generatePowerNodes(); + cableUpdateDelay--; + } else { + cableUpdateDelay--; + } if (mTickTimer % 10 == 0) { if (mSendClientData) { NW.sendPacketToAllPlayersInRange(worldObj, @@ -813,6 +844,10 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } public ITexture getCoverTexture(byte aSide) { + if (getCoverIDAtSide(aSide) == 0) return null; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) { + return BlockIcons.HIDDEN_TEXTURE[0]; // See through + } return GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide))); } @@ -843,8 +878,17 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE if (isValidFacing(aFacing)) { mFacing = aFacing; mMetaTileEntity.onFacingChange(); - onMachineBlockUpdate(); + doEnetUpdate(); + cableUpdateDelay = 10; + + if (mMetaTileEntity.shouldTriggerBlockUpdate()) { + // If we're triggering a block update this will call onMachineBlockUpdate() + GregTech_API.causeMachineUpdate(worldObj, xCoord, yCoord, zCoord); + } else { + // If we're not trigger a cascading one, call the update here. + onMachineBlockUpdate(); + } } } @@ -906,6 +950,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE tileEntityInvalid = false; leaveEnet(); if (canAccessData()) { + if (GregTech_API.mAE2) + invalidateAE(); mMetaTileEntity.onRemoval(); mMetaTileEntity.setBaseMetaTileEntity(null); } @@ -915,6 +961,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public void onChunkUnload() { super.onChunkUnload(); + if (GregTech_API.mAE2) + onChunkUnloadAE(); } @Override @@ -935,6 +983,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public void onMachineBlockUpdate() { if (canAccessData()) mMetaTileEntity.onMachineBlockUpdate(); + cableUpdateDelay = 10; } /** @@ -969,6 +1018,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE public void enableWorking() { if (!mWorks) mWorkUpdate = true; mWorks = true; + mWasShutdown = false; } @Override @@ -1061,6 +1111,26 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE return isEnergyOutputSide(aSide); } + public void generatePowerNodes() { + if (isServerSide() && mMetaTileEntity != null && (mMetaTileEntity.isEnetInput() || mMetaTileEntity.isEnetOutput())) { + int time = MinecraftServer.getServer().getTickCounter(); + for (byte i = 0;i<6;i++) { + if (outputsEnergyTo(i,false) || inputEnergyFrom(i,false)) { + IGregTechTileEntity TE = getIGregTechTileEntityAtSide(i); + if (TE instanceof BaseMetaPipeEntity) { + Node node = ((BaseMetaPipeEntity) TE).getNode(); + if (node == null) { + new GenerateNodeMapPower((BaseMetaPipeEntity) TE); + } else if (node.mCreationTime != time) { + GenerateNodeMap.clearNodeMap(node,-1); + new GenerateNodeMapPower((BaseMetaPipeEntity) TE); + } + } + } + } + } + } + @Override public long getOutputAmperage() { if (canAccessData() && mMetaTileEntity.isElectric()) return mMetaTileEntity.maxAmperesOut(); @@ -1144,11 +1214,18 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public ITexture[] getTexture(Block aBlock, byte aSide) { - ITexture rIcon = getCoverTexture(aSide); - if (rIcon != null) return new ITexture[]{rIcon}; - if (hasValidMetaTileEntity()) - return mMetaTileEntity.getTexture(this, aSide, mFacing, (byte) (mColor - 1), mActive, getOutputRedstoneSignal(aSide) > 0); - return Textures.BlockIcons.ERROR_RENDERING; + ITexture coverTexture = getCoverTexture(aSide); + ITexture[] textureUncovered = hasValidMetaTileEntity() ? + mMetaTileEntity.getTexture(this, aSide, mFacing, (byte) (mColor - 1), mActive, getOutputRedstoneSignal(aSide) > 0) : + Textures.BlockIcons.ERROR_RENDERING; + ITexture[] textureCovered; + if (coverTexture != null) { + textureCovered = Arrays.copyOf(textureUncovered, textureUncovered.length + 1); + textureCovered[textureUncovered.length] = coverTexture; + return textureCovered; + } else { + return textureUncovered; + } } private boolean isEnergyInputSide(byte aSide) { @@ -1355,9 +1432,11 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE 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, GregTech_API.sSoundList.get(100), 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, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); + cableUpdateDelay = 10; } return true; } @@ -1408,6 +1487,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE issueBlockUpdate(); } doEnetUpdate(); + cableUpdateDelay = 10; return true; } @@ -1418,6 +1498,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); } doEnetUpdate(); + cableUpdateDelay = 10; return true; } @@ -2202,5 +2283,88 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } return slotIndex + indexShift; } -} + @Override + @Optional.Method(modid = "appliedenergistics2") + public IGridNode getGridNode(ForgeDirection forgeDirection) { + if (mFacing != forgeDirection.ordinal()) + return null; + AENetworkProxy gp = getProxy(); + return gp != null ? gp.getNode() : null; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public AECableType getCableConnectionType(ForgeDirection forgeDirection) { + return mMetaTileEntity == null ? AECableType.NONE : mMetaTileEntity.getCableConnectionType(forgeDirection); + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public void securityBreak() {} + + @Override + @Optional.Method(modid = "appliedenergistics2") + public IGridNode getActionableNode() { + AENetworkProxy gp = getProxy(); + return gp != null ? gp.getNode() : null; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public AENetworkProxy getProxy() { + return mMetaTileEntity == null ? null : mMetaTileEntity.getProxy(); + } + @Override + @Optional.Method(modid = "appliedenergistics2") + public DimensionalCoord getLocation() { return new DimensionalCoord( this ); } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public void gridChanged() { + if (mMetaTileEntity != null) + mMetaTileEntity.gridChanged(); + } + + @TileEvent( TileEventType.WORLD_NBT_READ ) + @Optional.Method(modid = "appliedenergistics2") + public void readFromNBT_AENetwork( final NBTTagCompound data ) + { + AENetworkProxy gp = getProxy(); + if (gp != null) + getProxy().readFromNBT( data ); + } + + @TileEvent( TileEventType.WORLD_NBT_WRITE ) + @Optional.Method(modid = "appliedenergistics2") + public void writeToNBT_AENetwork( final NBTTagCompound data ) + { + AENetworkProxy gp = getProxy(); + if (gp != null) + gp.writeToNBT( data ); + } + + @Optional.Method(modid = "appliedenergistics2") + void onChunkUnloadAE() { + AENetworkProxy gp = getProxy(); + if (gp != null) + gp.onChunkUnload(); + } + + @Optional.Method(modid = "appliedenergistics2") + void invalidateAE() { + AENetworkProxy gp = getProxy(); + if (gp != null) + gp.invalidate(); + } + + @Override + public boolean wasShutdown() { + return mWasShutdown; + } + + @Override + public void setShutdownStatus(boolean newStatus) { + mWasShutdown = newStatus; + } +} diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java index fda019f486..1fb4f861ae 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntityUE.java @@ -95,4 +95,4 @@ public class BaseMetaTileEntityUE extends BaseMetaTileEntity /*implements IUETil } return rSides; }*/ -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 9fa16b9890..601b6fb4f9 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -13,6 +13,8 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; +import gregtech.common.GT_Client; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -130,6 +132,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { */ public abstract boolean renderInside(byte aSide); + public boolean isDisplaySecondaryDescription() { + return false; + } + @Override public IGregTechTileEntity getBaseMetaTileEntity() { return mBaseMetaTileEntity; @@ -239,7 +245,15 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} + 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. + */ + aBaseMetaTileEntity.issueTextureUpdate(); + } + } @Override public void inValidate() {/*Do nothing*/} @@ -693,8 +707,14 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { 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) - tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); + if (GregTech_API.sMachineExplosions){ + new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() + .setStrength(tStrength) + .setSmoking(true) + .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5) + .setWorld(tWorld) + .run(); + } } @Override @@ -827,7 +847,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { ((MetaPipeEntity) tPipe).disconnect(tSide); } - public boolean isConnectedAtSide(int aSide) { + @Override + public boolean isConnectedAtSide(int aSide) { return (mConnections & (1 << aSide)) != 0; } @@ -838,6 +859,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { public boolean canConnect(byte aSide, TileEntity tTileEntity) { return false; } public boolean getGT6StyleConnection() { return false; } + @Override public boolean shouldJoinIc2Enet() { return false; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index d08a8d9da5..87eee3e6ac 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity; +import appeng.api.util.AECableType; +import appeng.me.helpers.AENetworkProxy; +import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -7,7 +10,12 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.*; +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.GT_Client; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -43,6 +51,7 @@ import static gregtech.api.enums.GT_Values.V; * 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 { /** * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and for getInvName. @@ -53,6 +62,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity { */ public final ItemStack[] mInventory; public boolean doTickProfilingInThisTick = true; + + /** * accessibility to this Field is no longer given, see below */ @@ -80,7 +91,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity { } else { throw new IllegalArgumentException("MetaMachine-Slot Nr. " + aID + " is already occupied!"); } - mName = aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH); + mName = aBasicName.replace(" ", "_").toLowerCase(Locale.ENGLISH); setBaseMetaTileEntity(GregTech_API.constructBaseMetaTileEntity()); getBaseMetaTileEntity().setMetaTileID((short) aID); GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName); @@ -95,6 +106,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity { mName = aName; } + /** + * This method will only be called on client side + * @return whether the secondary description should be display. default is false + */ + public boolean isDisplaySecondaryDescription() { + return false; + } + @Override public IGregTechTileEntity getBaseMetaTileEntity() { return mBaseMetaTileEntity; @@ -162,7 +181,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity { if(!aPlayer.isSneaking()) return false; byte tSide = GT_Utility.getOppositeSide(aWrenchingSide); TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aWrenchingSide); - if (tTileEntity != null && (tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { + if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { // The tile entity we're facing is a cable, let's try to connect to it return ((IGregTechTileEntity) tTileEntity).getMetaTileEntity().onWireCutterRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); } @@ -174,7 +193,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity { if(!aPlayer.isSneaking()) return false; byte tSide = GT_Utility.getOppositeSide(aWrenchingSide); TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aWrenchingSide); - if (tTileEntity != null && (tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { + if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { // The tile entity we're facing is a cable, let's try to connect to it return ((IGregTechTileEntity) tTileEntity).getMetaTileEntity().onSolderingToolRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); } @@ -193,7 +212,15 @@ public abstract class MetaTileEntity implements IMetaTileEntity { public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} + 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. + */ + aBaseMetaTileEntity.issueTextureUpdate(); + } + } @Override public void inValidate() {/*Do nothing*/} @@ -932,5 +959,21 @@ public abstract class MetaTileEntity implements IMetaTileEntity { return ""; } + @Override public boolean shouldJoinIc2Enet() { return false; } + + public boolean shouldTriggerBlockUpdate() { return false; } + + @Optional.Method(modid = "appliedenergistics2") + public AECableType getCableConnectionType(ForgeDirection forgeDirection) { + return AECableType.NONE; + } + + @Optional.Method(modid = "appliedenergistics2") + public AENetworkProxy getProxy() { + return null; + } + + @Optional.Method(modid = "appliedenergistics2") + public void gridChanged() {} } 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 4d54a142cd..65993f2941 100644 --- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java +++ b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java @@ -1,22 +1,47 @@ package gregtech.api.metatileentity.examples; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.Textures.BlockIcons.*; + /** * This Example Implementation still works, however I use something completely different in my own Code. */ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_E_Furnace(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Not like using a Commodore 64", 1, 1, "E_Furnace.png", "smelting", new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)); + super(aID, aName, aNameRegional, aTier, 1, "Not like using a Commodore 64", 1, 1, "E_Furnace.png", "smelting", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), + 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.of( + TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), + 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) { @@ -35,16 +60,17 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine @Override public int checkRecipe() { if (null != (mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { - calculateOverclockedNess(4,128); - if(mMaxProgresstime==Integer.MAX_VALUE-1 && mEUt==Integer.MAX_VALUE-1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + calculateOverclockedNess(4, 128); + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } return DID_NOT_FIND_RECIPE; } @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; } @Override @@ -57,4 +83,4 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine public void startProcess() { sendLoopStart((byte) 1); } -}
\ No newline at end of file +} 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 02d6752bdd..de008abcab 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 @@ -9,6 +9,12 @@ import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; import gregtech.api.enums.TextureSet; import gregtech.api.enums.Textures; +import gregtech.api.graphs.PowerNode; +import gregtech.api.graphs.PowerNodes; +import gregtech.api.graphs.consumers.ConsumerNode; +import gregtech.api.graphs.Node; +import gregtech.api.graphs.NodeList; +import gregtech.api.graphs.paths.PowerNodePath; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; @@ -17,11 +23,8 @@ import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_GC_Compat; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.*; import gregtech.common.GT_Client; import gregtech.common.covers.GT_Cover_SolarPanel; import ic2.api.energy.EnergyNet; @@ -30,7 +33,6 @@ import ic2.api.energy.tile.IEnergySink; import ic2.api.energy.tile.IEnergySource; import ic2.api.energy.tile.IEnergyTile; import ic2.api.reactor.IReactorChamber; - import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -46,8 +48,6 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; -import appeng.api.parts.IPartHost; - import static gregtech.api.enums.GT_Values.VN; public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable { @@ -99,24 +99,24 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { if (!mInsulated) - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, mMaterial.mRGBa) )}; + return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, mMaterial.mRGBa) )}; if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) - return new ITexture[]{new GT_RenderedTexture(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))}; if (tThickNess < 0.374F)//0.375 x1 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, 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))}; } - return new ITexture[]{new GT_RenderedTexture(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 @@ -147,7 +147,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public int getProgresstime() { - return (int) mTransferredAmperage * 64; + return mTransferredAmperage * 64; } @Override @@ -161,7 +161,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return 0; if (!getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) return 0; - return transferElectricity(aSide, aVoltage, aAmperage, Sets.newHashSet((TileEntity) getBaseMetaTileEntity())); + HashSet<TileEntity> nul = null; + return transferElectricity(aSide, aVoltage, aAmperage,nul); } @Override @@ -172,118 +173,30 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { - if (!isConnectedAtSide(aSide) && aSide != 6) return 0; - - long rUsedAmperes = 0; - final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); - byte i = (byte)((((aSide/2)*2)+2)%6); //this bit of trickery makes sure a direction goes to the next cardinal pair. IE, NS goes to E, EW goes to U, UD goes to N. It's a lame way to make sure locally connected machines on a wire get EU first. - aVoltage -= mCableLossPerMeter; - - if (aVoltage > 0) for (byte j = 0; j < 6 && aAmperage > rUsedAmperes; j++, i=(byte)((i+1)%6) ) - if (i != aSide && isConnectedAtSide(i) && baseMetaTile.getCoverBehaviorAtSide(i).letsEnergyOut(i, baseMetaTile.getCoverIDAtSide(i), baseMetaTile.getCoverDataAtSide(i), baseMetaTile)) { - final TileEntity tTileEntity = baseMetaTile.getTileEntityAtSide(i); - - if (tTileEntity != null && aAlreadyPassedSet.add(tTileEntity)) { - final byte tSide = GT_Utility.getOppositeSide(i); - final IGregTechTileEntity tBaseMetaTile = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity) : null; - final IMetaTileEntity tMeta = tBaseMetaTile != null ? tBaseMetaTile.getMetaTileEntity() : null; - - if (tMeta instanceof IMetaTileEntityCable) { - if (tBaseMetaTile.getCoverBehaviorAtSide(tSide).letsEnergyIn(tSide, tBaseMetaTile.getCoverIDAtSide(tSide), tBaseMetaTile.getCoverDataAtSide(tSide), tBaseMetaTile) && ((IGregTechTileEntity) tTileEntity).getTimer() > 50) { - rUsedAmperes += ((IMetaTileEntityCable) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()).transferElectricity(tSide, aVoltage, aAmperage - rUsedAmperes, aAlreadyPassedSet); - } - } else { - rUsedAmperes += insertEnergyInto(tTileEntity, tSide, aVoltage, aAmperage - rUsedAmperes); - } - - } - } - mTransferredVoltage = Math.max(mTransferredVoltage, aVoltage); - mTransferredAmperage += rUsedAmperes; - mTransferredVoltageLast20 = Math.max(mTransferredVoltageLast20, aVoltage); - mTransferredAmperageLast20 = Math.max(mTransferredAmperageLast20, mTransferredAmperage); - if (aVoltage > mVoltage) { - mOverheat += Math.max(100, 100 * GT_Utility.getTier(aVoltage) - GT_Utility.getTier(mVoltage)); - } - if (mTransferredAmperage > mAmperage) return aAmperage; - - // Always return amount of used amperes, used on overheat - return rUsedAmperes; - } - - - - private long insertEnergyInto(TileEntity tTileEntity, byte tSide, long aVoltage, long aAmperage) { - if (aAmperage == 0 || tTileEntity == null) return 0; - - final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); - final ForgeDirection tDirection = ForgeDirection.getOrientation(tSide); - - if (tTileEntity instanceof IEnergyConnected) { - return ((IEnergyConnected) tTileEntity).injectEnergyUnits(tSide, aVoltage, aAmperage); - } - - // AE2 Compat - if (GT_Mod.gregtechproxy.mAE2Integration && tTileEntity instanceof appeng.tile.powersink.IC2) { - if (((appeng.tile.powersink.IC2) tTileEntity).acceptsEnergyFrom((TileEntity) baseMetaTile, tDirection)) { - long rUsedAmperes = 0; - while (aAmperage > rUsedAmperes && ((appeng.tile.powersink.IC2)tTileEntity).getDemandedEnergy() > 0 && ((appeng.tile.powersink.IC2)tTileEntity).injectEnergy(tDirection, aVoltage, aVoltage) <= aVoltage) - rUsedAmperes++; - - return rUsedAmperes; - } + if (!getBaseMetaTileEntity().isServerSide() || !isConnectedAtSide(aSide) && aSide != 6) return 0; + BaseMetaPipeEntity tBase =(BaseMetaPipeEntity) getBaseMetaTileEntity(); + if (!(tBase.getNode() instanceof PowerNode)) return 0; - } - - if (Loader.isModLoaded("GalacticraftCore")) { - long gc = GT_GC_Compat.insertEnergyInto(tTileEntity, aVoltage, tDirection); - if (gc != 2) - return gc; - } - - // IC2 Compat - { - final TileEntity tIc2Acceptor = (tTileEntity instanceof IEnergyTile || EnergyNet.instance == null) ? tTileEntity : - EnergyNet.instance.getTileEntity(tTileEntity.getWorldObj(), tTileEntity.xCoord, tTileEntity.yCoord, tTileEntity.zCoord); - - if (tIc2Acceptor instanceof IEnergySink && ((IEnergySink) tIc2Acceptor).acceptsEnergyFrom((TileEntity) baseMetaTile, tDirection)) { - long rUsedAmperes = 0; - while (aAmperage > rUsedAmperes && ((IEnergySink) tIc2Acceptor).getDemandedEnergy() > 0 && ((IEnergySink) tIc2Acceptor).injectEnergy(tDirection, aVoltage, aVoltage) <= aVoltage) - rUsedAmperes++; - return rUsedAmperes; - } - } - - // RF Compat - if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver) { - final IEnergyReceiver rfReceiver = (IEnergyReceiver) tTileEntity; - long rfOUT = aVoltage * GregTech_API.mEUtoRF / 100, rUsedAmperes = 0; - int rfOut = rfOUT > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) rfOUT; - - if (rfReceiver.receiveEnergy(tDirection, rfOut, true) == rfOut) { - rfReceiver.receiveEnergy(tDirection, rfOut, false); - rUsedAmperes++; - } - else if (rfReceiver.receiveEnergy(tDirection, rfOut, true) > 0) { - if (mRestRF == 0) { - int RFtrans = rfReceiver.receiveEnergy(tDirection, (int) rfOut, false); - rUsedAmperes++; - mRestRF = rfOut - RFtrans; - } else { - int RFtrans = rfReceiver.receiveEnergy(tDirection, (int) mRestRF, false); - mRestRF = mRestRF - RFtrans; + PowerNode tNode =(PowerNode) tBase.getNode(); + if (tNode != null) { + int tPlace = 0; + Node[] tToPower = new Node[tNode.mConsumers.size()]; + if (tNode.mHadVoltage) { + for (ConsumerNode consumer : tNode.mConsumers) { + if (consumer.needsEnergy()) + tToPower[tPlace++] = consumer; + } + } else { + tNode.mHadVoltage = true; + for (ConsumerNode consumer : tNode.mConsumers) { + tToPower[tPlace++] = consumer; } } - if (GregTech_API.mRFExplosions && rfReceiver.getMaxEnergyStored(tDirection) < rfOut * 600) { - if (rfOut > 32 * GregTech_API.mEUtoRF / 100) this.doExplosion(rfOut); - } - return rUsedAmperes; + return PowerNodes.powerNode(tNode,null,new NodeList(tToPower),(int)aVoltage,(int)aAmperage); } - return 0; } - @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { if(aBaseMetaTileEntity.isServerSide()) { @@ -292,73 +205,13 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } } + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - - { //amp handler - long worldTick = aBaseMetaTileEntity.getWorld().getTotalWorldTime(); - int tickDiff = (int) (worldTick - lastWorldTick); - lastWorldTick = worldTick; - - if (tickDiff >= 16) for (int i = 0; i <= 14; i++) lastAmperage[i] = 0; - else { - System.arraycopy(lastAmperage, tickDiff, lastAmperage, 0, 16 - tickDiff); - for (int i = 14; i >= 0; i--) { - if (--tickDiff > 0) lastAmperage[i] = 0; - else break; - } - } - - lastAmperage[15] = mTransferredAmperage; - - if (lastAmperage[15] > mAmperage) { - int i = 0; - for (; i <= 14; i++) { - if (lastAmperage[i] < mAmperage) { - lastAmperage[15] -= (int) mAmperage - lastAmperage[i]; - lastAmperage[i] = (int)mAmperage; - if (lastAmperage[15] <= mAmperage) break; - } - } - if (lastAmperage[15] > mAmperage) { - mOverheat += 100 * (lastAmperage[15] - mAmperage); - lastAmperage[15] = (int) mAmperage; - } else if (lastAmperage[15] < mAmperage) { - lastAmperage[i] = lastAmperage[15]; - lastAmperage[15] = (int) mAmperage; - } - } - } - - if(mOverheat>=mMaxOverheat) { - //TODO someday - //int newMeta=aBaseMetaTileEntity.getMetaTileID()-6; - //if(mInsulated && - // GregTech_API.METATILEENTITIES[newMeta] instanceof GT_MetaPipeEntity_Cable && - // ((GT_MetaPipeEntity_Cable)GregTech_API.METATILEENTITIES[newMeta]).mMaterial==mMaterial && - // ((GT_MetaPipeEntity_Cable)GregTech_API.METATILEENTITIES[newMeta]).mAmperage<=mAmperage){ - // aBaseMetaTileEntity.setOnFire(); - // aBaseMetaTileEntity.setMetaTileEntity(GregTech_API.METATILEENTITIES[newMeta]); - // return; - //}else{ - aBaseMetaTileEntity.setToFire(); - //} - }else if (mOverheat>0) mOverheat--; - - mTransferredVoltageOK=mTransferredVoltage; - mTransferredVoltage=0; - mTransferredAmperageOK=mTransferredAmperage; - mTransferredAmperage = 0; - - if (aTick % 20 == 0) { - mTransferredVoltageLast20OK=mTransferredVoltageLast20; - mTransferredVoltageLast20 = 0; - mTransferredAmperageLast20OK=mTransferredAmperageLast20; - mTransferredAmperageLast20 = 0; - if (!GT_Mod.gregtechproxy.gt6Cable || mCheckConnections) checkConnections(); - } - } else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aTick%20 == 0 && aBaseMetaTileEntity.isServerSide() && (!GT_Mod.gregtechproxy.gt6Cable || mCheckConnections)) { + checkConnections(); + } } @Override @@ -376,6 +229,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return false; } + @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) { if (isConnectedAtSide(aWrenchingSide)) { @@ -452,11 +306,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return true; // RF Input Compat - if (GregTech_API.mInputRF && (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter) tTileEntity).emitsEnergyTo((TileEntity)baseMetaTile, tDir))) - return true; - - - return false; + return GregTech_API.mInputRF && (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter) tTileEntity).emitsEnergyTo((TileEntity) baseMetaTile, tDir)); } @Override @@ -511,20 +361,28 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public String[] getInfoData() { + BaseMetaPipeEntity base = (BaseMetaPipeEntity) getBaseMetaTileEntity(); + PowerNodePath path =(PowerNodePath) base.getNodePath(); + int amps = 0; + int volts = 0; + if (path != null) { + amps = path.getAmps(); + volts = path.getVoltage(this); + } return new String[]{ //EnumChatFormatting.BLUE + mName + EnumChatFormatting.RESET, "Heat: "+ EnumChatFormatting.RED+ mOverheat +EnumChatFormatting.RESET+" / "+EnumChatFormatting.YELLOW+ mMaxOverheat + EnumChatFormatting.RESET, "Max Load (1t):", - EnumChatFormatting.GREEN + Integer.toString(mTransferredAmperageOK) + EnumChatFormatting.RESET +" A / "+ - EnumChatFormatting.YELLOW + Long.toString(mAmperage) + EnumChatFormatting.RESET +" A", + EnumChatFormatting.GREEN + Integer.toString(amps) + EnumChatFormatting.RESET +" A / "+ + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.RESET +" A", "Max EU/p (1t):", - EnumChatFormatting.GREEN + Long.toString(mTransferredVoltageOK) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(mVoltage) + EnumChatFormatting.RESET +" EU", + EnumChatFormatting.GREEN + Long.toString(volts) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + mVoltage + EnumChatFormatting.RESET +" EU", "Max Load (20t): "+ - EnumChatFormatting.GREEN + Integer.toString(mTransferredAmperageLast20OK) + EnumChatFormatting.RESET +" A", + EnumChatFormatting.GREEN + mTransferredAmperageLast20OK + EnumChatFormatting.RESET +" A", "Max EU/p (20t): "+ - EnumChatFormatting.GREEN + Long.toString(mTransferredVoltageLast20OK) + EnumChatFormatting.RESET +" EU" + EnumChatFormatting.GREEN + mTransferredVoltageLast20OK + EnumChatFormatting.RESET +" EU" }; } 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 2afc996df2..59c1e91543 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 @@ -13,10 +13,11 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Client; import gregtech.common.covers.GT_Cover_Drain; import gregtech.common.covers.GT_Cover_FluidRegulator; @@ -58,7 +59,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } 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); + super(aID, aName, aNameRegional, 0, false); mThickNess = aThickNess; mMaterial = aMaterial; mCapacity = aCapacity; @@ -97,62 +98,86 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - float tThickNess = getThickNess(); - if (mDisableInput == 0) return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + 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))}; byte tMask = 0; - byte[][] sRestrictionArray = new byte[][]{ - {2, 3, 5, 4}, - {2, 3, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 2, 3}, - {1, 0, 2, 3} + 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 - if (aSide == 5 || aSide == 2 || aSide == 0) + if (aSide == 5 || aSide == 2) if (tMask > 3 && tMask < 12) tMask = (byte) (tMask ^ 12); } - return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; - } - - protected static final ITexture getBaseTexture(float aThickNess, int aPipeAmount, Materials aMaterial, byte aColorIndex) { - if (aPipeAmount >= 9) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aPipeAmount >= 4) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.124F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.374F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.499F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.749F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.874F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + 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)); + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); } protected static final ITexture getRestrictorTexture(byte aMask) { - switch (aMask) { - case 1: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UP); - case 2: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DOWN); - case 3: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UD); - case 4: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LEFT); - case 5: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UL); - case 6: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DL); - case 7: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NR); - case 8: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_RIGHT); - case 9: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UR); - case 10: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DR); - case 11: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NL); - case 12: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LR); - case 13: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_ND); - case 14: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NU); - case 15: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR); - default: return null; - } + switch (aMask) { + case 1: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_UP); + case 2: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_DOWN); + case 3: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_UD); + case 4: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_LEFT); + case 5: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_UL); + case 6: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_DL); + case 7: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_NR); + case 8: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_RIGHT); + case 9: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_UR); + case 10: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_DR); + case 11: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_NL); + case 12: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_LR); + case 13: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_ND); + case 14: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR_NU); + case 15: + return TextureFactory.of(Textures.BlockIcons.PIPE_RESTRICTOR); + default: + return null; + } } @Override public void onValueUpdate(byte aValue) { - mDisableInput = aValue; + mDisableInput = aValue; } @Override @@ -192,45 +217,48 @@ 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); - aNBT.setByte("mDisableInput", mDisableInput); + aNBT.setByte("mConnections", mConnections); + aNBT.setByte("mDisableInput", mDisableInput); } } @Override public void loadNBTData(NBTTagCompound aNBT) { - for (int i = 0; i < mPipeAmount; i++) - mFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"+(i==0?"":i))); + for (int i = 0; i < mPipeAmount; i++) + mFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid" + (i == 0 ? "" : i))); mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom"); if (GT_Mod.gregtechproxy.gt6Pipe) { - mConnections = aNBT.getByte("mConnections"); - mDisableInput = aNBT.getByte("mDisableInput"); + mConnections = aNBT.getByte("mConnections"); + mDisableInput = aNBT.getByte("mDisableInput"); } } @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { - if ((((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) { - for (FluidStack tFluid : mFluids) { - if (tFluid != null) { - int tTemperature = tFluid.getFluid().getTemperature(tFluid); + if ((((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) { + for (FluidStack tFluid : mFluids) { + if (tFluid != null) { + int tTemperature = tFluid.getFluid().getTemperature(tFluid); if (tTemperature > 320 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { - GT_Utility.applyHeatDamage((EntityLivingBase) aEntity, (tTemperature - 300) / 50.0F); break; + 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; + GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); + break; } - } - } + } + } } } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide() && aTick % 5 == 0) { mLastReceivedFrom &= 63; if (mLastReceivedFrom == 63) { @@ -255,7 +283,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { oLastReceivedFrom = mLastReceivedFrom; - } else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); + } } private boolean checkEnvironment(int index, IGregTechTileEntity aBaseMetaTileEntity) { @@ -267,13 +295,13 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (tTemperature > mHeatResistance) { if (aBaseMetaTileEntity.getRandomNumber(100) == 0) { // Poof - GT_Log.exp.println("Set Pipe to Fire due to to low heat resistance at "+aBaseMetaTileEntity.getXCoord()+ " | "+aBaseMetaTileEntity.getYCoord()+ " | "+aBaseMetaTileEntity.getZCoord()+ " DIMID: "+aBaseMetaTileEntity.getWorld().provider.dimensionId); + GT_Log.exp.println("Set Pipe to Fire due to to low heat resistance at " + aBaseMetaTileEntity.getXCoord() + " | " + aBaseMetaTileEntity.getYCoord() + " | " + aBaseMetaTileEntity.getZCoord() + " DIMID: " + aBaseMetaTileEntity.getWorld().provider.dimensionId); aBaseMetaTileEntity.setToFire(); return true; } // Mmhmm, Fire aBaseMetaTileEntity.setOnFire(); - GT_Log.exp.println("Set Blocks around Pipe to Fire due to to low heat resistance at "+aBaseMetaTileEntity.getXCoord()+ " | "+aBaseMetaTileEntity.getYCoord()+ " | "+aBaseMetaTileEntity.getZCoord()+ " DIMID: "+aBaseMetaTileEntity.getWorld().provider.dimensionId); + GT_Log.exp.println("Set Blocks around Pipe to Fire due to to low heat resistance at " + aBaseMetaTileEntity.getXCoord() + " | " + aBaseMetaTileEntity.getYCoord() + " | " + aBaseMetaTileEntity.getZCoord() + " DIMID: " + aBaseMetaTileEntity.getWorld().provider.dimensionId); } if (!mGasProof && tFluid.getFluid().isGaseous(tFluid)) { @@ -317,9 +345,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { final IGregTechTileEntity gTank = tTank instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTank : null; if (isConnectedAtSide(aSide) && tTank != null && (mLastReceivedFrom & (1 << aSide)) == 0 && - getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsFluidOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), tFluid.getFluid(), getBaseMetaTileEntity()) && - (gTank == null || gTank.getCoverBehaviorAtSide(tSide).letsFluidIn(tSide, gTank.getCoverIDAtSide(tSide), gTank.getCoverDataAtSide(tSide), tFluid.getFluid(), gTank))) - { + getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsFluidOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), tFluid.getFluid(), getBaseMetaTileEntity()) && + (gTank == null || gTank.getCoverBehaviorAtSide(tSide).letsFluidIn(tSide, gTank.getCoverIDAtSide(tSide), gTank.getCoverDataAtSide(tSide), tFluid.getFluid(), gTank))) { if (tTank.fill(ForgeDirection.getOrientation(tSide), tFluid, false) > 0) { tTanks.add(new MutableTriple<>(tTank, ForgeDirection.getOrientation(tSide), 0)); } @@ -333,15 +360,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { double availableCapacity = 0; // Calculate available capacity for distribution from all tanks - for (MutableTriple<IFluidHandler, ForgeDirection, Integer> tEntry: tTanks) { + for (MutableTriple<IFluidHandler, ForgeDirection, Integer> tEntry : tTanks) { tEntry.right = tEntry.left.fill(tEntry.middle, maxFluid, false); availableCapacity += tEntry.right; } // Now distribute - for (MutableTriple<IFluidHandler, ForgeDirection, Integer> tEntry: tTanks) { - if (availableCapacity > tAmount) tEntry.right = (int) Math.floor(tEntry.right * tAmount / availableCapacity); // Distribue fluids based on percentage available space at destination - if (tEntry.right == 0) tEntry.right = (int)Math.min(1, tAmount); // If the percent is not enough to give at least 1L, try to give 1L + for (MutableTriple<IFluidHandler, ForgeDirection, Integer> tEntry : tTanks) { + if (availableCapacity > tAmount) + tEntry.right = (int) Math.floor(tEntry.right * tAmount / availableCapacity); // Distribue fluids based on percentage available space at destination + if (tEntry.right == 0) + tEntry.right = (int) Math.min(1, tAmount); // If the percent is not enough to give at least 1L, try to give 1L if (tEntry.right <= 0) continue; int tFilledAmount = tEntry.left.fill(tEntry.middle, drainFromIndex(tEntry.right, false, index), false); @@ -353,31 +382,30 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Mod.gregtechproxy.gt6Pipe) { - byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); - byte tMask = (byte) (1 << tSide); - if (aPlayer.isSneaking()) { - if (isInputDisabledAtSide(tSide)) { - mDisableInput &= ~tMask; - GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled")); - if (!isConnectedAtSide(tSide)) - connect(tSide); - } else { - mDisableInput |= tMask; - GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled")); - } - } else { - if (!isConnectedAtSide(tSide)) { - if (connect(tSide) > 0) - GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); - } - else { - disconnect(tSide); - GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); - } - } - return true; - } + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); + byte tMask = (byte) (1 << tSide); + if (aPlayer.isSneaking()) { + if (isInputDisabledAtSide(tSide)) { + mDisableInput &= ~tMask; + GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled")); + if (!isConnectedAtSide(tSide)) + connect(tSide); + } else { + mDisableInput |= tMask; + GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled")); + } + } else { + if (!isConnectedAtSide(tSide)) { + if (connect(tSide) > 0) + GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); + } else { + disconnect(tSide); + GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); + } + } + return true; + } return false; } @@ -396,7 +424,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { 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; @@ -417,18 +445,18 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { || gTileEntity != null && gTileEntity.getCoverBehaviorAtSide(tSide) instanceof GT_Cover_FluidRegulator; } - } + } return false; } @Optional.Method(modid = "TConstruct") - private boolean isTConstructFaucet(TileEntity tTileEntity){ + private boolean isTConstructFaucet(TileEntity tTileEntity) { // Tinker Construct Faucets return a null tank info, so check the class return tTileEntity instanceof tconstruct.smeltery.logic.FaucetLogic; } @Optional.Method(modid = "Translocator") - private boolean isTranslocator(TileEntity tTileEntity){ + private boolean isTranslocator(TileEntity tTileEntity) { // Translocators return a TankInfo, but it's of 0 length - so check the class if we see this pattern return tTileEntity instanceof codechicken.translocator.TileLiquidTranslocator; } @@ -444,23 +472,37 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { super.doSound(aIndex, aX, aY, aZ); if (aIndex == 9) { GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(4), 5, 1.0F, aX, aY, aZ); - for (byte i = 0; i < 6; i++) - getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5 + XSTR_INSTANCE.nextFloat(), aY - 0.5 + XSTR_INSTANCE.nextFloat(), aZ - 0.5 + XSTR_INSTANCE.nextFloat(), ForgeDirection.getOrientation(i).offsetX / 5.0, ForgeDirection.getOrientation(i).offsetY / 5.0, ForgeDirection.getOrientation(i).offsetZ / 5.0); + + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setIdentifier("largesmoke") + .setWorld(getBaseMetaTileEntity().getWorld()) + .<WorldSpawnedEventBuilder.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() + ); } } @Override public final int getCapacity() { - return mCapacity * 20 * mPipeAmount; + return mCapacity * 20 * mPipeAmount; } @Override public FluidTankInfo getInfo() { - for (FluidStack tFluid : mFluids) { - if (tFluid != null) - return new FluidTankInfo(tFluid, mCapacity * 20); - } - return new FluidTankInfo(null, mCapacity * 20); + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + return new FluidTankInfo(tFluid, mCapacity * 20); + } + return new FluidTankInfo(null, mCapacity * 20); } @Override @@ -468,7 +510,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; ArrayList<FluidTankInfo> tList = new ArrayList<>(); for (FluidStack tFluid : mFluids) - tList.add(new FluidTankInfo(tFluid, mCapacity * 20)); + tList.add(new FluidTankInfo(tFluid, mCapacity * 20)); return tList.toArray(new FluidTankInfo[mPipeAmount]); } @@ -484,20 +526,20 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public final FluidStack getFluid() { - for (FluidStack tFluid : mFluids) { - if (tFluid != null) - return tFluid; - } + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + return tFluid; + } return null; } @Override public final int getFluidAmount() { - int rAmount = 0; - for (FluidStack tFluid : mFluids) { - if (tFluid != null) - rAmount += tFluid.amount; - } + int rAmount = 0; + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + rAmount += tFluid.amount; + } return rAmount; } @@ -507,20 +549,20 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { int index = -1; for (int i = 0; i < mPipeAmount; i++) { - if (mFluids[i] != null && mFluids[i].isFluidEqual(aFluid)) { - index = i; break; - } - else if ((mFluids[i] == null || mFluids[i].getFluid().getID() <= 0) && index < 0) { - index = i; - } - } - + if (mFluids[i] != null && mFluids[i].isFluidEqual(aFluid)) { + index = i; + break; + } else if ((mFluids[i] == null || mFluids[i].getFluid().getID() <= 0) && index < 0) { + index = i; + } + } + return fill_default_intoIndex(aSide, aFluid, doFill, index); } private final int fill_default_intoIndex(ForgeDirection aSide, FluidStack aFluid, boolean doFill, int index) { - if (index < 0 || index >= mPipeAmount) return 0; - if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0; + if (index < 0 || index >= mPipeAmount) return 0; + if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0; if (mFluids[index] == null || mFluids[index].getFluid().getID() <= 0) { if (aFluid.amount * mPipeAmount <= getCapacity()) { @@ -557,17 +599,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public final FluidStack drain(int maxDrain, boolean doDrain) { - FluidStack drained = null; - for (int i = 0; i < mPipeAmount; i++) { - if ((drained = drainFromIndex(maxDrain, doDrain, i)) != null) - return drained; - } - return null; + FluidStack drained = null; + for (int i = 0; i < mPipeAmount; i++) { + if ((drained = drainFromIndex(maxDrain, doDrain, i)) != null) + return drained; + } + return null; } private final FluidStack drainFromIndex(int maxDrain, boolean doDrain, int index) { - if (index < 0 || index >= mPipeAmount) return null; - if (mFluids[index] == null) return null; + if (index < 0 || index >= mPipeAmount) return null; + if (mFluids[index] == null) return null; if (mFluids[index].amount <= 0) { mFluids[index] = null; return null; @@ -599,12 +641,12 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public String[] getDescription() { if (mPipeAmount == 1) { - return new String[]{ + return new String[]{ EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY }; } else { - return new String[]{ + return new String[]{ EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY, EnumChatFormatting.AQUA + "Pipe Amount: %%%" + mPipeAmount + EnumChatFormatting.GRAY @@ -614,65 +656,96 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public float getThickNess() { - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } @Override public boolean isLiquidInput(byte aSide) { - return !isInputDisabledAtSide(aSide); + return !isInputDisabledAtSide(aSide); } @Override public boolean isLiquidOutput(byte aSide) { - return true; + return true; } public boolean isInputDisabledAtSide(int aSide) { - return (mDisableInput & (1 << aSide)) != 0; + return (mDisableInput & (1 << aSide)) != 0; } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) - return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); - else - return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else + return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - mThickNess)/2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; - if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; - if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; - if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; - if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; - if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; - - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + float tSpace = (1f - mThickNess) / 2; + float tSide0 = tSpace; + float tSide1 = 1f - tSpace; + float tSide2 = tSpace; + float tSide3 = 1f - tSpace; + float tSide4 = tSpace; + float tSide5 = 1f - tSpace; + + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0) { + tSide2 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0) { + tSide0 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide3 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0) { + tSide0 = tSide2 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + + byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; + if ((tConn & (1 << ForgeDirection.DOWN.ordinal())) != 0) tSide0 = 0f; + if ((tConn & (1 << ForgeDirection.UP.ordinal())) != 0) tSide1 = 1f; + if ((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; + if ((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; + if ((tConn & (1 << ForgeDirection.WEST.ordinal())) != 0) tSide4 = 0f; + if ((tConn & (1 << ForgeDirection.EAST.ordinal())) != 0) tSide5 = 1f; + + return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); } @Override public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { - super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { - AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); - } + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } + } + + @Override + public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + if (aFluid == null) + return null; + for (int i = 0; i < mFluids.length; ++i) { + final FluidStack f = mFluids[i]; + if (f == null || !f.isFluidEqual(aFluid)) + continue; + return drainFromIndex(aFluid.amount, doDrain, i); + } + return null; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java index 7074d63422..e1677b1deb 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java @@ -1,11 +1,15 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.*; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +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; @@ -15,6 +19,9 @@ import net.minecraft.nbt.NBTTagCompound; import static gregtech.api.enums.GT_Values.RA; public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { + private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( + "gt.blockmachines.gt_frame.desc.format", + "Just something you can put covers on."); public final Materials mMaterial; public GT_MetaPipeEntity_Frame(int aID, String aName, String aNameRegional, Materials aMaterial) { @@ -43,12 +50,12 @@ 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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.frameGt.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.frameGt.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; } @Override public String[] getDescription() { - return new String[]{"Just something you can put a Cover or CFoam on."}; + return localizedDescFormat.split("\\R"); } @Override @@ -102,4 +109,4 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { public boolean isMachineBlockUpdateRecursive() { return true; } -}
\ No newline at end of file +} 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 c73e95e95b..e24aebc064 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -1,7 +1,9 @@ package gregtech.api.metatileentity.implementations; import gregtech.GT_Mod; -import gregtech.api.enums.*; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe; @@ -9,7 +11,7 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; @@ -30,6 +32,8 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.ConcurrentHashMap; +import static gregtech.api.enums.Textures.BlockIcons.PIPE_RESTRICTOR; + public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe { public final float mThickNess; public final Materials mMaterial; @@ -38,6 +42,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public int mTransferredItems = 0; public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0; 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) { super(aID, aName, aNameRegional, aInvSlotCount, false); @@ -78,34 +83,34 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; + return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; if (tThickNess < 0.374F)//0.375 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.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[]{new GT_RenderedTexture(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))}; if (tThickNess < 0.374F)//0.375 - return new ITexture[]{new GT_RenderedTexture(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[]{new GT_RenderedTexture(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[]{new GT_RenderedTexture(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[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - return new ITexture[]{new GT_RenderedTexture(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[]{new GT_RenderedTexture(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 @@ -142,19 +147,20 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public void saveNBTData(NBTTagCompound aNBT) { aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); if (GT_Mod.gregtechproxy.gt6Pipe) - aNBT.setByte("mConnections", mConnections); + aNBT.setByte("mConnections", mConnections); } @Override public void loadNBTData(NBTTagCompound aNBT) { mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom"); if (GT_Mod.gregtechproxy.gt6Pipe) { - mConnections = aNBT.getByte("mConnections"); + mConnections = aNBT.getByte("mConnections"); } } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide() && aTick % 10 == 0) { if (aTick % mTickTime == 0) mTransferredItems = 0; @@ -180,23 +186,22 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if (isInventoryEmpty()) mLastReceivedFrom = 6; oLastReceivedFrom = mLastReceivedFrom; - }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); + } } @Override public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Mod.gregtechproxy.gt6Pipe) { - byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); - if (!isConnectedAtSide(tSide)) { - if (connect(tSide) > 0) - GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); - } - else { - disconnect(tSide); - GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); - } - return true; - } + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); + if (isConnectedAtSide(tSide)) { + disconnect(tSide); + GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); + } else { + if (connect(tSide) > 0) + GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); + } + return true; + } return false; } @@ -270,7 +275,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE TileEntity tInventory = getBaseMetaTileEntity().getTileEntityAtSide(aSide); if (tInventory != null && !(tInventory instanceof BaseMetaPipeEntity)) { if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) { - return GT_Utility.moveMultipleItemStacks(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,1) > 0; + return GT_Utility.moveMultipleItemStacks(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1, 1) > 0; } } } @@ -304,7 +309,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return isConnectedAtSide(aSide) && super.canInsertItem(aIndex, aStack, aSide); + return isConnectedAtSide(aSide) && super.canInsertItem(aIndex, aStack, aSide); } @Override @@ -313,13 +318,26 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity(); + boolean tAllow = tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, tTileEntity); + if (tAllow) { + if (cacheSides == null) + cacheSides = super.getAccessibleSlotsFromSide(aSide); + return cacheSides; + } else { + return new int[0]; + } + } + + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return isConnectedAtSide(aSide); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!isConnectedAtSide(aSide)) return false; + if (!isConnectedAtSide(aSide)) return false; if (isInventoryEmpty()) mLastReceivedFrom = aSide; return mLastReceivedFrom == aSide && mInventory[aIndex] == null; } @@ -341,51 +359,69 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public float getThickNess() { - if(GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) - return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); - else - return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else + return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - mThickNess)/2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; - if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; - if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; - if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; - if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; - if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; - - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + float tSpace = (1f - mThickNess) / 2; + float tSide0 = tSpace; + float tSide1 = 1f - tSpace; + float tSide2 = tSpace; + float tSide3 = 1f - tSpace; + float tSide4 = tSpace; + float tSide5 = 1f - tSpace; + + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0) { + tSide2 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0) { + tSide0 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide3 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0) { + tSide0 = tSide2 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + + byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; + if ((tConn & (1 << ForgeDirection.DOWN.ordinal())) != 0) tSide0 = 0f; + if ((tConn & (1 << ForgeDirection.UP.ordinal())) != 0) tSide1 = 1f; + if ((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; + if ((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; + if ((tConn & (1 << ForgeDirection.WEST.ordinal())) != 0) tSide4 = 0f; + if ((tConn & (1 << ForgeDirection.EAST.ordinal())) != 0) tSide5 = 1f; + + return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); } @Override public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { - super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { - AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); - } + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } } -}
\ No newline at end of file +} 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 1577015e2e..f6535d2ddc 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 @@ -159,4 +159,4 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { public int getCapacity() { return (mTier + 1) * 1000; } -}
\ No newline at end of file +} 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 73b45ecbb2..54fe2b32a6 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 @@ -68,4 +68,4 @@ public abstract class GT_MetaTileEntity_BasicHull_NonElectric extends GT_MetaTil @Override public abstract ITexture[][][] getTextureSet(ITexture[] aTextures); -}
\ No newline at end of file +} 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 2c632c596b..834344d2d2 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 @@ -3,19 +3,19 @@ package gregtech.api.metatileentity.implementations; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_BasicMachine; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMachineCallback; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_OreDictUnificator; 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.GT_ClientPreference; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -23,6 +23,7 @@ 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.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -32,6 +33,8 @@ import java.util.Arrays; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.debugCleanroom; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; /** @@ -53,6 +56,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B 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 mDisableFilter = true; public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; public FluidStack mOutputFluid; public String mGUIName, mNEIName; @@ -155,7 +159,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B 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[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; + rTextures[i][c + 1] = new ITexture[]{MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; } for (byte c = -1; c < 16; c++) { @@ -380,6 +384,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } @Override + public boolean isDrainableStackSeparate() { + return true; + } + + @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; if(!GT_Mod.gregtechproxy.mForceFreeFace) { @@ -409,6 +418,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public void initDefaultModes(NBTTagCompound aNBT) { mMainFacing = -1; + if (!getBaseMetaTileEntity().getWorld().isRemote) { + GT_ClientPreference tPreference = GT_Mod.gregtechproxy.getClientPreference(getBaseMetaTileEntity().getOwnerUuid()); + if (tPreference != null) + mDisableFilter = !tPreference.isSingleBlockInitialFilterEnabled(); + } } @Override @@ -418,6 +432,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B aNBT.setBoolean("mItemTransfer", mItemTransfer); aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated); aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide); + aNBT.setBoolean("mDisableFilter", mDisableFilter); aNBT.setInteger("mEUt", mEUt); aNBT.setInteger("mMainFacing", mMainFacing); aNBT.setInteger("mProgresstime", mProgresstime); @@ -437,6 +452,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mItemTransfer = aNBT.getBoolean("mItemTransfer"); mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated"); mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide"); + mDisableFilter = aNBT.getBoolean("mDisableFilter"); mEUt = aNBT.getInteger("mEUt"); mMainFacing = aNBT.getInteger("mMainFacing"); mProgresstime = aNBT.getInteger("mProgresstime"); @@ -516,8 +532,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length; - int tCost = moveMultipleItemStacks(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks); - aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCost, true); + moveMultipleItemStacks(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks); // for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { // tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); // if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); @@ -568,7 +583,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mHasBeenUpdated = true; getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing()); } + } + @Override + public void updateFluidDisplayItem() { + super.updateFluidDisplayItem(); if (displaysInputFluid()) { int tDisplayStackSlot = OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; if (getFillableStack() == null) { @@ -774,13 +793,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B EnumChatFormatting.BLUE + mNEIName + EnumChatFormatting.RESET, "Progress:", EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET +" s", "Stored Energy:", EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU", + EnumChatFormatting.YELLOW + getBaseMetaTileEntity().getEUCapacity() + EnumChatFormatting.RESET +" EU", "Probably uses: " + - EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + Integer.toString(mEUt==0?0:mAmperage) + EnumChatFormatting.RESET +" A" + EnumChatFormatting.RED + mEUt + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + (mEUt == 0 ? 0 : mAmperage) + EnumChatFormatting.RESET +" A" }; } @@ -792,8 +811,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { - mAllowInputFromOutputSide = !mAllowInputFromOutputSide; - GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? trans("095","Input from Output Side allowed") : trans("096","Input from Output Side forbidden")); + if (aPlayer.isSneaking()){ + mDisableFilter = !mDisableFilter; + GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter)); + } else { + mAllowInputFromOutputSide = !mAllowInputFromOutputSide; + GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? trans("095", "Input from Output Side allowed") : trans("096", "Input from Output Side forbidden")); + } } } @@ -813,7 +837,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B return false; for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i == aIndex; - return true; + return mDisableFilter || allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack); + } + + /** + * Test if given stack can be inserted into specified slot. + * Before execution of this method it is ensured there is no such kind of item inside any input slots already. + */ + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return mInventory[aIndex] == null; } /** @@ -897,58 +929,58 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } } 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 23aa69213c..3cdb26c9e1 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 @@ -2,12 +2,12 @@ package gregtech.api.metatileentity.implementations; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; @@ -16,6 +16,13 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZE_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZE_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZE_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; /** @@ -153,8 +160,22 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE super.doSound(aIndex, aX, aY, aZ); if (aIndex == 9) { GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(4), 5, 1.0F, aX, aY, aZ); - for (int l = 0; l < 8; ++l) - getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5 + XSTR_INSTANCE.nextFloat(), aY - 0.5 + XSTR_INSTANCE.nextFloat(), aZ - 0.5 + XSTR_INSTANCE.nextFloat(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX / 5.0, ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetY / 5.0, ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ / 5.0); + + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setIdentifier("largesmoke") + .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 + ) + .<WorldSpawnedEventBuilder.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() + ); } } @@ -174,71 +195,71 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; } -}
\ No newline at end of file +} 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 17dbd560a2..281d0f6541 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -1,17 +1,22 @@ package gregtech.api.metatileentity.implementations; import cpw.mods.fml.common.Loader; -import gregtech.api.enums.*; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures.BlockIcons.CustomIcon; +import gregtech.api.enums.Tier; import gregtech.api.gui.GT_Container_BasicMachine; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import ic2.core.Ic2Items; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; @@ -22,7 +27,10 @@ import net.minecraftforge.oredict.OreDictionary; import java.util.Locale; import java.util.Random; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.GT_Values.ticksBetweenSounds; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -36,8 +44,38 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ private final String mSound; private final boolean mSharedTank, mRequiresFluidForFiltering; private final byte mGUIParameterA, mGUIParameterB; - public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) { - super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM"))); + + 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 + ) { + super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of( + TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM")), + TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_GLOW"))).glow().build()) + ); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; this.mSpecialEffect = aSpecialEffect; @@ -657,13 +695,22 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ throw new IllegalArgumentException("MISSING TIER MAPPING FOR: " + aRecipe[i] + " AT TIER " + mTier); } - if (!GT_ModHandler.addCraftingRecipe(getStackForm(1), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, aRecipe)) { + if ( + !GT_ModHandler.addCraftingRecipe( + getStackForm(1), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, aRecipe + ) + ) { throw new IllegalArgumentException("INVALID CRAFTING RECIPE FOR: " + getStackForm(1).getDisplayName()); } } } - 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; @@ -675,7 +722,11 @@ 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; @@ -689,7 +740,11 @@ 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.mSound, this.mSharedTank, this.mRequiresFluidForFiltering, this.mSpecialEffect); + 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.mSound, + this.mSharedTank, this.mRequiresFluidForFiltering, this.mSpecialEffect + ); } @Override @@ -699,23 +754,53 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), this.mGUIName, GT_Utility.isStringValid(this.mNEIName) ? this.mNEIName : this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "", this.mGUIParameterA, this.mGUIParameterB); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), this.mGUIName, + GT_Utility.isStringValid(this.mNEIName) ? this.mNEIName : this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "", + this.mGUIParameterA, this.mGUIParameterB + ); } @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false; - if (this.mInventory[aIndex] != null) return true; + 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: - return this.getFillableStack() == null ? !this.mRequiresFluidForFiltering && this.getRecipeList().containsInput(aStack) : null != this.getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, true, V[this.mTier], new FluidStack[]{this.getFillableStack()}, this.getSpecialSlot(), new ItemStack[]{aStack}); + if (this.getFillableStack() == null) + return !this.mRequiresFluidForFiltering && this.getRecipeList().containsInput(aStack); + else + return this.getRecipeList().findRecipe( + this.getBaseMetaTileEntity(), this.mLastRecipe, true, V[this.mTier], new FluidStack[]{this.getFillableStack()}, + this.getSpecialSlot(), new ItemStack[]{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) && null != this.getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, true, V[this.mTier], new FluidStack[]{this.getFillableStack()}, this.getSpecialSlot(), aIndex == this.getInputSlot() ? new ItemStack[]{aStack, this.getInputAt(1)} : new ItemStack[]{this.getInputAt(0), aStack}))))); + + 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, V[this.mTier], + new FluidStack[]{this.getFillableStack()}, + this.getSpecialSlot(), aIndex == this.getInputSlot() ? + new ItemStack[]{aStack, this.getInputAt(1)} : + new ItemStack[]{this.getInputAt(0), aStack} + ) != null + ) + ) + ) + ); default:{ int tID = this.getBaseMetaTileEntity().getMetaTileID(); - if (tID >= 211 && tID <= 218 || tID >= 1180 && tID <= 1187 || tID >= 10780 && tID <= 10786) {//assembler lv-iv; circuit asseblers lv - uv; assemblers luv-uev + if (tID >= 211 && tID <= 218 || tID >= 1180 && tID <= 1187 || tID >= 10780 && tID <= 10786) { //assembler lv-iv; circuit asseblers lv - uv; assemblers luv-uev if (GT_Utility.isStackValid(aStack)) for (int oreID : OreDictionary.getOreIDs(aStack)) { if (OreDictionary.getOreName(oreID).contains("circuit")) @@ -738,8 +823,18 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ break; case 1: if (aBaseMetaTileEntity.getFrontFacing() != 1 && aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0 && !aBaseMetaTileEntity.getOpacityAtSide((byte) 1)) { + Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F, 0.0D, 0.0D, 0.0D); + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setMotion(0.0D, 0.0D, 0.0D) + .setIdentifier("smoke") + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F + ) + .setWorld(aBaseMetaTileEntity.getWorld()) + .run(); } break; } 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 767d47eeee..20a3758324 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java @@ -1,9 +1,16 @@ package gregtech.api.metatileentity.implementations; import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; + +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEEL_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEEL_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEEL_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; /** @@ -25,12 +32,6 @@ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEn super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked); } - /* - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicMachine_Steel(mTier, mDescription, mTextures); - } - */ @Override public float getSteamDamage() { return 12.0F; @@ -38,71 +39,71 @@ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEn @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_TOP : Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_TOP : Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; } @Override public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_TOP : Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_TOP : Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? 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[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE : Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; } -}
\ No newline at end of file +} 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 f4a70b2ee5..6a65eaf5d8 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 @@ -3,22 +3,26 @@ package gregtech.api.metatileentity.implementations; import gregtech.api.enums.ItemList; import gregtech.api.gui.GT_Container_BasicTank; import gregtech.api.gui.GT_GUIContainer_BasicTank; +import gregtech.api.interfaces.IHasFluidDisplayItem; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; 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!!! * <p/> * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually */ -public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock { +public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock implements IHasFluidDisplayItem { public FluidStack mFluid; + protected int mOpenerCount; /** * @param aInvSlotCount should be 3 @@ -100,6 +104,9 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier return mFluid; } + /** + * If you override this and change the field returned, be sure to override {@link #isDrainableStackSeparate()} as well! + */ public FluidStack getDrainableStack() { return mFluid; } @@ -109,6 +116,10 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier return mFluid; } + public boolean isDrainableStackSeparate() { + return false; + } + public FluidStack getDisplayedFluid() { return getDrainableStack(); } @@ -124,19 +135,27 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } @Override + public void onOpenGUI() { + super.onOpenGUI(); + mOpenerCount++; + if (mOpenerCount == 1) + updateFluidDisplayItem(); + } + + @Override + public void onCloseGUI() { + super.onCloseGUI(); + mOpenerCount--; + } + + @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) setFillableStack(null); - if (displaysItemStack() && getStackDisplaySlot() >= 0 && getStackDisplaySlot() < mInventory.length) { - if (getDisplayedFluid() == null) { - if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) - mInventory[getStackDisplaySlot()] = null; - } else { - mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), displaysStackSize()); - } - } + if (mOpenerCount > 0) + updateFluidDisplayItem(); if (doesEmptyContainers()) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); @@ -150,7 +169,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } } } else { - if (tFluid.isFluidEqual(getFillableStack()) && tFluid.amount + getFillableStack().amount <= getCapacity()) { + if (tFluid.isFluidEqual(getFillableStack()) && ((long)tFluid.amount + getFillableStack().amount) <= (long)getCapacity()) { if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { getFillableStack().amount += tFluid.amount; aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -173,6 +192,18 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } @Override + public void updateFluidDisplayItem() { + if (displaysItemStack() && getStackDisplaySlot() >= 0 && getStackDisplaySlot() < mInventory.length) { + if (getDisplayedFluid() == null) { + if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) + mInventory[getStackDisplaySlot()] = null; + } else { + mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), displaysStackSize()); + } + } + } + + @Override public FluidStack getFluid() { return getDrainableStack(); } @@ -249,6 +280,19 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } @Override + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; + if (isDrainableStackSeparate()) { + return new FluidTankInfo[]{ + new FluidTankInfo(getFillableStack(), getCapacity()), + new FluidTankInfo(getDrainableStack(), getCapacity()) + }; + } else { + return new FluidTankInfo[]{new FluidTankInfo(this)}; + } + } + + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aIndex == getOutputSlot(); } @@ -261,4 +305,4 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier protected void onEmptyingContainerWhenEmpty(){ //Do nothing } -}
\ No newline at end of file +} 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 8758ea1a02..7f9e21ff65 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -1,9 +1,8 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -11,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredMachineBlock { private static final int OUTPUT_INDEX = 0; @@ -20,7 +20,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM private static final int ARROW_UP_INDEX = 4; private static final int FRONT_INDEX = 5; - public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bStockingMode = false; + public int mMaxStackSize = 64; + public static int MAX = 8; + 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) { @@ -43,18 +45,26 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[ForgeDirection.VALID_DIRECTIONS.length][17][]; ITexture tIcon = getOverlayIcon(); - ITexture tOut = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT); - ITexture tUp = new GT_RenderedTexture(Textures.BlockIcons.ARROW_UP); - ITexture tDown = new GT_RenderedTexture(Textures.BlockIcons.ARROW_DOWN); - ITexture tLeft = new GT_RenderedTexture(Textures.BlockIcons.ARROW_LEFT); - ITexture tRight = new GT_RenderedTexture(Textures.BlockIcons.ARROW_RIGHT); + 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()); for (int i = 0; i < rTextures[0].length; i++) { - rTextures[OUTPUT_INDEX][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], tOut}; - rTextures[ARROW_RIGHT_INDEX][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], tRight, tIcon}; - rTextures[ARROW_DOWN_INDEX][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], tDown, tIcon}; - rTextures[ARROW_LEFT_INDEX][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], tLeft, tIcon}; - rTextures[ARROW_UP_INDEX][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], tUp, tIcon}; - rTextures[FRONT_INDEX][i] = new ITexture[]{Textures.BlockIcons.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; } @@ -97,10 +107,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM break; case WEST: switch (side) { - case DOWN: case UP: case SOUTH: return mTextures[ARROW_RIGHT_INDEX][colorIndex]; // ARROW_RIGHT + case DOWN: case NORTH: return mTextures[ARROW_LEFT_INDEX][colorIndex]; // ARROW_LEFT default: @@ -108,10 +118,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM break; case EAST: switch (side) { - case DOWN: case UP: case SOUTH: return mTextures[ARROW_LEFT_INDEX][colorIndex]; // ARROW_LEFT + case DOWN: case NORTH: return mTextures[ARROW_RIGHT_INDEX][colorIndex]; // ARROW_RIGHT default: @@ -213,6 +223,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM aNBT.setBoolean("bRedstoneIfFull", bRedstoneIfFull); aNBT.setBoolean("bStockingMode", bStockingMode); aNBT.setInteger("mTargetStackSize", mTargetStackSize); + aNBT.setBoolean("bSortStacks", bSortStacks); } @Override @@ -220,9 +231,13 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM bInvert = aNBT.getBoolean("bInvert"); bOutput = aNBT.getBoolean("bOutput"); bRedstoneIfFull = aNBT.getBoolean("bRedstoneIfFull"); + bSortStacks = aNBT.getBoolean("bSortStacks"); if (aNBT.hasKey("bStockingMode")) { // Adding new key to existing NBT, need to protect if it is not there. bStockingMode = aNBT.getBoolean("bStockingMode"); } + if (aNBT.hasKey("bSortStacks")) { + bSortStacks = aNBT.getBoolean("bSortStacks"); + } mTargetStackSize = aNBT.getInteger("mTargetStackSize"); } @@ -237,7 +252,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM if (aSide == getBaseMetaTileEntity().getBackFacing()) { mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65); - if(mTargetStackSize <0){mTargetStackSize = 64;} + if(mTargetStackSize <0){mTargetStackSize = mMaxStackSize;} if (mTargetStackSize == 0) { GT_Utility.sendChatToPlayer(aPlayer, trans("098","Do not regulate Item Stack Size")); } else { @@ -248,8 +263,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified() || aTimer % 200 == 0 || mSuccess > 0)) { + if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide() && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified() || aTimer % 200 == 0 || mSuccess > 0)) { mSuccess--; + updateSlots(); moveItems(aBaseMetaTileEntity, aTimer); for(byte b = 0;b<6;b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b,bInvert ? (byte)15 : (byte)0); @@ -261,7 +277,6 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM if (mInventory[i] == null) { for(byte b = 0;b<6;b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b,bInvert ? (byte)15 : (byte)0); - aBaseMetaTileEntity.decreaseStoredEnergyUnits(1, true); break; } } @@ -276,16 +291,19 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - 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,1); - 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,1); - - if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) { - mSuccess = 50; - aBaseMetaTileEntity.decreaseStoredEnergyUnits(Math.abs(tCost), true); - } + moveItems(aBaseMetaTileEntity, aTimer, 1); + } + + protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer, int stacks) { + int tCost; + if (bStockingMode) + tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, (byte) 64, (byte) 1, stacks); + else + tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, (byte) 64, (byte) 1, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, stacks); + + if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) { + mSuccess = 50; + } } @Override @@ -302,4 +320,32 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM public boolean allowGeneralRedstoneOutput(){ return true; } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + if (bSortStacks) + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + if (bSortStacks) { + for (int i = 0; i < mInventory.length; i++) + for (int j = i + 1; j < mInventory.length; j++) + if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + + @Override + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer.isSneaking()) { + // I was so proud of all this but I literally just copied code from OutputBus + bSortStacks = !bSortStacks; + GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Sort mode: " + (bSortStacks ? "Disabled" : "Enabled"))); + return true; + } + return super.onSolderingToolRightClick(aSide,aWrenchingSide,aPlayer,aX,aY,aZ); + } + } 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 0683f020fa..2faf113e18 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java @@ -1,6 +1,5 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_2by2; import gregtech.api.gui.GT_Container_4by4; import gregtech.api.gui.GT_GUIContainer_2by2; @@ -8,11 +7,13 @@ import gregtech.api.gui.GT_GUIContainer_4by4; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DATA_ACCESS; + public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch { private int timeout=4; @@ -32,12 +33,12 @@ public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_DATA_ACCESS)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.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_Energy.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java index 18338e11b2..d9fb5f01cc 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 @@ -96,4 +96,4 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } -}
\ No newline at end of file +} 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 466095fc21..e37d2160a2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -1,16 +1,17 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +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.minecraftforge.fluids.FluidStack; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; + public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; @@ -28,12 +29,12 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index f2f76dca4f..ebda3cccbc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -1,11 +1,19 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; -import gregtech.api.gui.*; +import gregtech.GT_Mod; +import gregtech.api.gui.GT_Container_1by1; +import gregtech.api.gui.GT_Container_2by2; +import gregtech.api.gui.GT_Container_3by3; +import gregtech.api.gui.GT_Container_4by4; +import gregtech.api.gui.GT_GUIContainer_1by1; +import gregtech.api.gui.GT_GUIContainer_2by2; +import gregtech.api.gui.GT_GUIContainer_3by3; +import gregtech.api.gui.GT_GUIContainer_4by4; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_ClientPreference; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; @@ -15,6 +23,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; + public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; public boolean disableSort; @@ -37,12 +47,12 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override @@ -92,6 +102,15 @@ 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()); + if (tPreference != null) + disableFilter = !tPreference.isInputBusInitialFilterEnabled(); + } + } + + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { switch (mInventory.length) { case 1: @@ -161,6 +180,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { } } + @Override public String trans(String aKey, String aEnglish) { return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); } 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 2742e99816..9067f5bb7b 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 @@ -5,7 +5,6 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_2by2; import gregtech.api.gui.GT_Container_MaintenanceHatch; import gregtech.api.gui.GT_GUIContainer_2by2; @@ -13,7 +12,7 @@ import gregtech.api.gui.GT_GUIContainer_MaintenanceHatch; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -24,6 +23,13 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DUCTTAPE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MAINTENANCE; + public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; @@ -66,14 +72,25 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - if(mAuto)return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE)}; - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.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, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE)}; - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MAINTENANCE), new GT_RenderedTexture(Textures.BlockIcons.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 @@ -146,7 +163,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch } public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess) { - ItemStack[] mInputs=new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), + ItemStack[] mInputs= {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)}; @@ -188,12 +205,12 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch } } } - this.mCrowbar = true; - this.mHardHammer = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mSolderingTool = true; - this.mWrench = true; + mCrowbar = true; + mHardHammer = true; + mScrewdriver = true; + mSoftHammer = true; + mSolderingTool = true; + mWrench = true; updateSlots(); } return true; 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 b3998b62e7..9e59520edb 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -1,11 +1,14 @@ package gregtech.api.metatileentity.implementations; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,40 +17,49 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.Arrays; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MUFFLER; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +@SuppressWarnings("unused") // Unused API is expected within scope public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { + private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( + "gt.blockmachines.hatch.muffler.desc.format", + "Outputs the Pollution (Might cause ... things)%n" + + "DO NOT OBSTRUCT THE OUTPUT!%n" + + "Reduces Pollution to %d%%%n" + + "Recovers %d%% of CO2/CO/SO2"); + private final int pollutionReduction = calculatePollutionReduction(100); + private final int pollutionRecover = 100 - pollutionReduction; + private final String[] description = String.format(localizedDescFormat, pollutionReduction, pollutionRecover) + .split("\\R"); + private final boolean[] facings = new boolean[ForgeDirection.VALID_DIRECTIONS.length]; + public GT_MetaTileEntity_Hatch_Muffler(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Outputs the Pollution (Might cause ... things)"); + super(aID, aName, aNameRegional, aTier, 0, ""); } public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 0, aDescription, aTextures); + this(aName, aTier, new String[]{aDescription}, aTextures); } public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); + setInValidFacings(ForgeDirection.DOWN); } @Override public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 3]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescriptionArray.length + 1] = "Reduces Pollution to " + calculatePollutionReduction(100) + "%"; - //Pollution Recovery scales from 5% at LV to 100% at MAX Voltage - desc[mDescriptionArray.length + 2] = "Recovers " + (105 - calculatePollutionReduction(100)) + "% of CO2/CO/SO2"; - return desc; + return description; } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; } @Override @@ -55,31 +67,18 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { return true; } - private int[] mFacings; - - /*private void init()*/ { - setInValidFacings(ForgeDirection.DOWN); - } - - public void setInValidFacings(ForgeDirection... aFacings) { - mFacings = Arrays.stream(aFacings).mapToInt(Enum::ordinal).toArray(); - } - @Override - public boolean isFacingValid(byte aFacing) { - for (int x : mFacings) - if (x == aFacing) - return false; - return true; + public boolean isValidSlot(int aIndex) { + return false; } @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; } @Override - public boolean isValidSlot(int aIndex) { + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } @@ -88,38 +87,28 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescriptionArray, mTextures); } - public boolean polluteEnvironment() { - if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { - GT_Pollution.addPollution(getBaseMetaTileEntity(), calculatePollutionReduction(10000)); - return true; - } - return false; - } - - public int calculatePollutionReduction(int aPollution) { - return (int) (aPollution * (Math.pow(0.85F, mTier - 1))); - } - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) { + pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "largesmoke"); + } } @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; + public boolean isFacingValid(byte aFacing) { + return facings[aFacing]; } @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) - pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "largesmoke"); + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; } + @SideOnly(Side.CLIENT) public void pollutionParticles(World aWorld, String name) { boolean chk1, chk2, chk3; - float ran1 = XSTR_INSTANCE.nextFloat(), ran2 = 0, ran3 = 0; + float ran1 = XSTR_INSTANCE.nextFloat(), ran2, ran3; chk1 = ran1 * 100 < calculatePollutionReduction(100); if (GT_Pollution.getPollution(getBaseMetaTileEntity()) >= GT_Mod.gregtechproxy.mPollutionSmogLimit) { ran2 = XSTR_INSTANCE.nextFloat(); @@ -129,6 +118,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { if (!(chk1 || chk2 || chk3)) return; } else { if (!chk1) return; + ran2 = ran3 = 0.0F; chk2 = chk3 = false; } @@ -151,13 +141,60 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { zSpd = aDir.offsetZ * (0.1F + 0.2F * XSTR_INSTANCE.nextFloat()); } - if (chk1) - aWorld.spawnParticle(name, xPos + ran1 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); + WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder() + .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(); + } + if (chk2) { + events.setPosition(xPos + ran2 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F) + .run(); + } + if (chk3) { + events.setPosition(xPos + ran3 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F) + .run(); + } + } + + public int calculatePollutionReduction(int aPollution) { + if (mTier < 2) { + return aPollution; + } + return (int) ((float) aPollution * ((100F - 12.5F * ((float) mTier - 1F)) / 100F)); + } + + /** + * @return pollution success + * @deprecated replaced by {@link .polluteEnvironment(MetaTileEntity)} + */ + @Deprecated + public boolean polluteEnvironment() { + return polluteEnvironment(null); + } - if (chk2) - aWorld.spawnParticle(name, xPos + ran2 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); + /** + * @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) { + if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { + GT_Pollution.addPollution(getBaseMetaTileEntity(), calculatePollutionReduction(10000)); + return true; + } + return false; + } - if (chk3) - aWorld.spawnParticle(name, xPos + ran3 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); + /** + * @param aFacings the {@link ForgeDirection} invalid facings + * @apiNote API Code, BartWorks/TecTech based EBF relies on this. It's marked here, not anywhere else. + */ + public void setInValidFacings(ForgeDirection... aFacings) { + Arrays.fill(facings, true); + Arrays.stream(aFacings).forEach(face -> facings[face.ordinal()] = false); } } 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 71eea9bf87..9965b88a17 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -1,18 +1,23 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; 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.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.*; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import net.minecraftforge.fluids.IFluidHandler; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { private String lockedFluidName = null; @@ -38,12 +43,12 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override @@ -262,6 +267,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); } + @Override public String trans(String aKey, String aEnglish){ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); } @@ -302,4 +308,19 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { GT_Utility.sendChatToPlayer(playerThatLockedfluid, String.format(trans("151.4","Sucessfully locked Fluid to %s"), mFluid.getLocalizedName())); } } + @Override + public boolean isGivingInformation() { + return true; + } + @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 + Integer.toString(mFluid == null ? 0 : mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ + EnumChatFormatting.YELLOW+ getCapacity() + " L"+ EnumChatFormatting.RESET, + lockedFluidName == null ? "Not Locked" : ("Locked to " + StatCollector.translateToLocal(getLockedFluidName())) + }; + } } 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 1dafbcce5a..a46157fb36 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -1,18 +1,25 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Textures; -import gregtech.api.gui.*; +import gregtech.api.gui.GT_Container_1by1; +import gregtech.api.gui.GT_Container_2by2; +import gregtech.api.gui.GT_Container_3by3; +import gregtech.api.gui.GT_Container_4by4; +import gregtech.api.gui.GT_GUIContainer_1by1; +import gregtech.api.gui.GT_GUIContainer_2by2; +import gregtech.api.gui.GT_GUIContainer_3by3; +import gregtech.api.gui.GT_GUIContainer_4by4; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import static gregtech.api.util.GT_Utility.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) { @@ -20,6 +27,14 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { "Capacity: " + getSlots(aTier) + " stack" + (getSlots(aTier) >= 2 ? "s" : "")}); } + public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier), aDescription); + } + + public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, int inventorySize) { + super(aID, aName, aNameRegional, aTier, inventorySize, aDescription); + } + public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } @@ -28,14 +43,18 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String[] aDescription, int inventorySize, ITexture[][][] aTextures) { + super(aName, aTier, inventorySize, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override @@ -98,6 +117,42 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { } } + /** + * 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) { + for (int i = 0, mInventoryLength = mInventory.length; i < mInventoryLength && aStack.stackSize > 0; i++) { + ItemStack tSlot = mInventory[i]; + if (GT_Utility.isStackInvalid(tSlot)) { + if (aStack.stackSize <= getInventoryStackLimit()) { + mInventory[i] = aStack; + return true; + } + mInventory[i] = aStack.splitStack(getInventoryStackLimit()); + } else { + int tRealStackLimit = Math.min(getInventoryStackLimit(), tSlot.getMaxStackSize()); + if (tSlot.stackSize < tRealStackLimit && + tSlot.isItemEqual(aStack) && + ItemStack.areItemStackTagsEqual(tSlot, aStack)) { + if (aStack.stackSize + tSlot.stackSize <= tRealStackLimit) { + mInventory[i].stackSize += aStack.stackSize; + return true; + } else { + // more to serve + aStack.stackSize -= tRealStackLimit - tSlot.stackSize; + mInventory[i].stackSize = tRealStackLimit; + } + } + } + } + return false; + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aSide == aBaseMetaTileEntity.getFrontFacing(); @@ -115,7 +170,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { IInventory tTileEntity =aBaseMetaTileEntity.getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing()); if(tTileEntity!=null){ moveMultipleItemStacks(aBaseMetaTileEntity,tTileEntity,aBaseMetaTileEntity.getFrontFacing(),aBaseMetaTileEntity.getBackFacing(),null,false,(byte)64,(byte)1,(byte)64,(byte)1,mInventory.length); - + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; // GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity, // aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), // null, false, (byte) 64, (byte) 1, (byte)( 64 * aBaseMetaTileEntity.getSizeInventory()), (byte) 1); 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 202e542c88..193b9d482c 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 @@ -23,6 +23,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; @@ -34,21 +35,21 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public static boolean disableMaintenance; public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false; public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0; - public volatile int mUpdate = 0; + public volatile int mUpdate = 0; //TODO: Replace with AtomicInteger public ItemStack[] mOutputItems = null; public FluidStack[] mOutputFluids = null; public String mNEI; public int damageFactorLow = 5; public float damageFactorHigh = 0.6f; - public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Input>(); - public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Output>(); - public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<GT_MetaTileEntity_Hatch_InputBus>(); - public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<GT_MetaTileEntity_Hatch_OutputBus>(); - public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch_Dynamo>(); - public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>(); - public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>(); - public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>(); + public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<>(); + public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<>(); public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); @@ -70,6 +71,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } @Override + public boolean isDisplaySecondaryDescription() { + return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); + } + + @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { return aSide != getBaseMetaTileEntity().getFrontFacing(); } @@ -302,8 +308,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { 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; - for(GT_MetaTileEntity_Hatch_Muffler aMuffler:mMufflerHatches) - aMuffler.getBaseMetaTileEntity().setActive(active); + for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { + IGregTechTileEntity iGTTileEntity = aMuffler.getBaseMetaTileEntity(); + if (iGTTileEntity != null && !iGTTileEntity.isDead()) { + iGTTileEntity.setActive(active); + } + } } } @@ -312,7 +322,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { if (mPollution >= 10000) { - if (tHatch.polluteEnvironment()) { + if (tHatch.polluteEnvironment(this)) { mPollution -= 10000; } } else { @@ -333,7 +343,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } if (mEUt < 0) { if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { - stopMachine(); + criticalStopMachine(); return false; } } @@ -385,6 +395,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { getBaseMetaTileEntity().disableWorking(); } + public void criticalStopMachine() { + stopMachine(); + getBaseMetaTileEntity().setShutdownStatus(true); + } + public int getRepairStatus() { return (mWrench ? 1 : 0) + (mScrewdriver ? 1 : 0) + (mSoftHammer ? 1 : 0) + (mHardHammer ? 1 : 0) + (mSolderingTool ? 1 : 0) + (mCrowbar ? 1 : 0); } @@ -727,35 +742,21 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public boolean addOutput(ItemStack aStack) { if (GT_Utility.isStackInvalid(aStack)) return false; aStack = GT_Utility.copy(aStack); -// FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); -// if (aLiquid == null) { + for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) { + if (isValidMetaTileEntity(tHatch) && tHatch.storeAll(aStack)) { + return true; + } + } boolean outputSuccess = true; while (outputSuccess && aStack.stackSize > 0) { outputSuccess = false; ItemStack single = aStack.splitStack(1); - for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) { - if (!outputSuccess && isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getSizeInventory() - 1; i >= 0 && !outputSuccess; i--) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true; - } - } - } for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { if (!outputSuccess && isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) { if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true; } } } -// }else { -// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { -// if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) { -// int tAmount = tHatch.fill(aLiquid, false); -// if (tAmount >= aLiquid.amount) { -// return tHatch.fill(aLiquid, true) >= aLiquid.amount; -// } -// } -// } -// } return outputSuccess; } @@ -791,7 +792,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public ArrayList<ItemStack> getStoredOutputs() { - ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); + ArrayList<ItemStack> rList = new ArrayList<>(); // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { // if (isValidMetaTileEntity(tHatch)) { // rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); @@ -808,7 +809,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public ArrayList<FluidStack> getStoredFluids() { - ArrayList<FluidStack> rList = new ArrayList<FluidStack>(); + ArrayList<FluidStack> rList = new ArrayList<>(); for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { @@ -819,7 +820,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public ArrayList<ItemStack> getStoredInputs() { - ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); + ArrayList<ItemStack> rList = new ArrayList<>(); // for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { // tHatch.mRecipeMap = getRecipeMap(); // if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) { @@ -1003,4 +1004,47 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } + + protected ItemStack[] getCompactedInputs(){ + //TODO: repalce method with a cleaner one + ArrayList<ItemStack> tInputList = getStoredInputs(); + int tInputList_sS = tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (!GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) + continue; + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + } + } + return tInputList.toArray(new ItemStack[0]); + } + + protected FluidStack[] getCompactedFluids(){ + //TODO: repalce method with a cleaner one + ArrayList<FluidStack> tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (!GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) + continue; + + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + return tFluidList.toArray(new FluidStack[0]); + } } 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 711670db08..5cc4245bc8 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 @@ -115,7 +115,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi @Override public long maxEUStore() { - return 512L + V[mTier + 1] * 2L; + return Math.max(512L, 1L << (mTier + 1)) + V[mTier + 1] * 2L; } @Override diff --git a/src/main/java/gregtech/api/net/GT_Packet.java b/src/main/java/gregtech/api/net/GT_Packet.java index 6fdd013d8f..48cc171d61 100644 --- a/src/main/java/gregtech/api/net/GT_Packet.java +++ b/src/main/java/gregtech/api/net/GT_Packet.java @@ -1,8 +1,14 @@ 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; +/** + * @deprecated Use {@link GT_Packet_New} instead + */ +@Deprecated public abstract class GT_Packet { public GT_Packet(boolean aIsReference) { // @@ -17,13 +23,33 @@ public abstract class GT_Packet { /** * @return encoded byte Stream + * @deprecated Use {@link #encode(ByteBuf)} instead */ + @Deprecated public abstract byte[] encode(); /** + * 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(); + } + + /** * @return encoded byte Stream */ public abstract GT_Packet decode(ByteArrayDataInput aData); + /** + * Process the packet + * + * @param aWorld null if message is received on server side, the client world if message is received on client side + */ public abstract void process(IBlockAccess aWorld); -}
\ No newline at end of file + + /** + * 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 d8cab48bd0..9060144e22 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,15 +1,14 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; +import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; /** * Used to transfer Block Events in a much better fashion */ -public class GT_Packet_Block_Event extends GT_Packet { +public class GT_Packet_Block_Event extends GT_Packet_New { private int mX, mZ; private short mY; private byte mID, mValue; @@ -28,18 +27,16 @@ public class GT_Packet_Block_Event extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(10); - tOut.writeInt(mX); - tOut.writeShort(mY); - tOut.writeInt(mZ); - tOut.writeByte(mID); - tOut.writeByte(mValue); - return tOut.toByteArray(); + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); + aOut.writeByte(mID); + aOut.writeByte(mValue); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_Block_Event(aData.readInt(), aData.readShort(), aData.readInt(), aData.readByte(), aData.readByte()); } @@ -55,4 +52,4 @@ public class GT_Packet_Block_Event extends GT_Packet { public byte getPacketID() { return 2; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java b/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java new file mode 100644 index 0000000000..a97cfb207b --- /dev/null +++ b/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java @@ -0,0 +1,53 @@ +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; + +public class GT_Packet_ClientPreference extends GT_Packet_New { + private GT_ClientPreference mPreference; + private EntityPlayerMP mPlayer; + + public GT_Packet_ClientPreference() { + super(true); + } + + public GT_Packet_ClientPreference(GT_ClientPreference mPreference) { + super(false); + this.mPreference = mPreference; + } + + @Override + public byte getPacketID() { + return 9; + } + + @Override + public void setINetHandler(INetHandler aHandler) { + if (aHandler instanceof NetHandlerPlayServer) { + mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; + } + } + + @Override + public void process(IBlockAccess aWorld) { + if (mPlayer != null) + GT_Mod.gregtechproxy.setClientPreference(mPlayer.getUniqueID(), mPreference); + } + + @Override + public void encode(ByteBuf aOut) { + aOut.writeBoolean(mPreference.isSingleBlockInitialFilterEnabled()); + aOut.writeBoolean(mPreference.isInputBusInitialFilterEnabled()); + } + + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { + return new GT_Packet_ClientPreference(new GT_ClientPreference(aData.readBoolean(), aData.readBoolean())); + } +} diff --git a/src/main/java/gregtech/api/net/GT_Packet_New.java b/src/main/java/gregtech/api/net/GT_Packet_New.java new file mode 100644 index 0000000000..59f6dc7251 --- /dev/null +++ b/src/main/java/gregtech/api/net/GT_Packet_New.java @@ -0,0 +1,28 @@ +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); + } + + @Override + @Deprecated + public final byte[] encode() { + ByteBuf tOut = Unpooled.buffer(); + encode(tOut); + byte[] bytes = new byte[tOut.readableBytes()]; + tOut.readBytes(bytes); + return bytes; + } + + @Override + public abstract void encode(ByteBuf aOut); + + @Override + public abstract GT_Packet_New decode(ByteArrayDataInput aData); +} diff --git a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java index 7f717c1a47..20efe41679 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java @@ -2,12 +2,11 @@ package gregtech.api.net; 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; -import java.nio.ByteBuffer; - -public class GT_Packet_Pollution extends GT_Packet { +public class GT_Packet_Pollution extends GT_Packet_New { private ChunkCoordIntPair chunk; private int pollution; @@ -22,17 +21,12 @@ public class GT_Packet_Pollution extends GT_Packet { } @Override - public byte[] encode() { - return ByteBuffer - .allocate(12) - .putInt(chunk.chunkXPos) - .putInt(chunk.chunkZPos) - .putInt(pollution) - .array(); + public void encode(ByteBuf aOut) { + aOut.writeInt(chunk.chunkXPos).writeInt(chunk.chunkZPos).writeInt(pollution); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_Pollution( new ChunkCoordIntPair(aData.readInt(), aData.readInt()), aData.readInt() @@ -48,4 +42,4 @@ public class GT_Packet_Pollution extends GT_Packet { public byte getPacketID() { return 4; } -}
\ No newline at end of file +} 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 5490d0d390..be66400609 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Sound.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Sound.java @@ -1,12 +1,16 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; +import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufOutputStream; import net.minecraft.world.IBlockAccess; -public class GT_Packet_Sound extends GT_Packet { +import java.io.DataOutput; +import java.io.IOException; + +public class GT_Packet_Sound extends GT_Packet_New { private int mX, mZ; private short mY; private String mSoundName; @@ -27,19 +31,23 @@ public class GT_Packet_Sound extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(10); - tOut.writeUTF(mSoundName); - tOut.writeFloat(mSoundStrength); - tOut.writeFloat(mSoundPitch); - tOut.writeInt(mX); - tOut.writeShort(mY); - tOut.writeInt(mZ); - return tOut.toByteArray(); + public void encode(ByteBuf aOut) { + DataOutput tOut = new ByteBufOutputStream(aOut); + try { + tOut.writeUTF(mSoundName); + tOut.writeFloat(mSoundStrength); + tOut.writeFloat(mSoundPitch); + tOut.writeInt(mX); + tOut.writeShort(mY); + tOut.writeInt(mZ); + } catch (IOException e) { + // this really shouldn't happen, but whatever + e.printStackTrace(GT_Log.err); + } } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_Sound(aData.readUTF(), aData.readFloat(), aData.readFloat(), aData.readInt(), aData.readShort(), aData.readInt()); } @@ -52,4 +60,4 @@ public class GT_Packet_Sound extends GT_Packet { public byte getPacketID() { return 1; } -}
\ No newline at end of file +} 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 457bd7f21d..051be672ab 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java @@ -1,14 +1,13 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; +import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; -public class GT_Packet_TileEntity extends GT_Packet { +public class GT_Packet_TileEntity extends GT_Packet_New { private int mX, mZ, mC0, mC1, mC2, mC3, mC4, mC5; private short mY, mID; private byte mTexture, mTexturePage, mUpdate, mRedstone, mColor; @@ -58,32 +57,28 @@ public class GT_Packet_TileEntity extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(41); + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); + aOut.writeShort(mID); - tOut.writeInt(mX); - tOut.writeShort(mY); - tOut.writeInt(mZ); - tOut.writeShort(mID); + aOut.writeInt(mC0); + aOut.writeInt(mC1); + aOut.writeInt(mC2); + aOut.writeInt(mC3); + aOut.writeInt(mC4); + aOut.writeInt(mC5); - tOut.writeInt(mC0); - tOut.writeInt(mC1); - tOut.writeInt(mC2); - tOut.writeInt(mC3); - tOut.writeInt(mC4); - tOut.writeInt(mC5); - - tOut.writeByte(mTexture); - tOut.writeByte(mTexturePage); - tOut.writeByte(mUpdate); - tOut.writeByte(mRedstone); - tOut.writeByte(mColor); - - return tOut.toByteArray(); + aOut.writeByte(mTexture); + aOut.writeByte(mTexturePage); + aOut.writeByte(mUpdate); + aOut.writeByte(mRedstone); + aOut.writeByte(mColor); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_TileEntity(aData.readInt(), aData.readShort(), aData.readInt(), aData.readShort(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readByte(), aData.readByte(), aData.readByte(), aData.readByte(), aData.readByte()); } @@ -104,4 +99,4 @@ public class GT_Packet_TileEntity extends GT_Packet { public byte getPacketID() { return 0; } -}
\ No newline at end of file +} 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 bc688f47ed..29220e05ab 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java @@ -1,10 +1,9 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; 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; @@ -14,7 +13,7 @@ import net.minecraftforge.common.DimensionManager; * Client -> Server: Update cover data */ -public class GT_Packet_TileEntityCover extends GT_Packet { +public class GT_Packet_TileEntityCover extends GT_Packet_New { protected int mX; protected short mY; protected int mZ; @@ -57,23 +56,20 @@ public class GT_Packet_TileEntityCover extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(4+2+4+1+4+4+4); - tOut.writeInt(mX); - tOut.writeShort(mY); - tOut.writeInt(mZ); + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); - tOut.writeByte(side); - tOut.writeInt(coverID); - tOut.writeInt(coverData); + aOut.writeByte(side); + aOut.writeInt(coverID); + aOut.writeInt(coverData); - tOut.writeInt(dimID); - - return tOut.toByteArray(); + aOut.writeInt(dimID); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_TileEntityCover( aData.readInt(), aData.readShort(), @@ -96,4 +92,4 @@ public class GT_Packet_TileEntityCover extends GT_Packet { } } } -}
\ No newline at end of file +} 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 58ebf95ac6..2a8091144d 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java @@ -1,12 +1,11 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.common.GT_Proxy; +import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayerMP; @@ -18,7 +17,7 @@ import net.minecraft.world.World; * Server -> Client: Show GUI */ -public class GT_Packet_TileEntityCoverGUI extends GT_Packet { +public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { protected int mX; protected short mY; protected int mZ; @@ -79,24 +78,21 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(4+2+4+1+4+4+4+4); - tOut.writeInt(mX); - tOut.writeShort(mY); - tOut.writeInt(mZ); + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); - tOut.writeByte(side); - tOut.writeInt(coverID); - tOut.writeInt(coverData); + aOut.writeByte(side); + aOut.writeInt(coverID); + aOut.writeInt(coverData); - tOut.writeInt(dimID); - tOut.writeInt(playerID); - - return tOut.toByteArray(); + aOut.writeInt(dimID); + aOut.writeInt(playerID); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_TileEntityCoverGUI( aData.readInt(), aData.readShort(), @@ -122,4 +118,4 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet { } } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java new file mode 100644 index 0000000000..3ce0b48821 --- /dev/null +++ b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java @@ -0,0 +1,95 @@ +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; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; + +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; + + private EntityPlayerMP mPlayer; + private int mPublicChannel; + private int mCheckBoxValue; + + public GT_Packet_WirelessRedstoneCover() { + super(); + } + + 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) { + super(coverSide, coverID, 0, tile); + mPublicChannel = publicChannel; + mCheckBoxValue = checkBoxValue; + } + + @Override + public byte getPacketID() { + return 10; + } + + @Override + public void setINetHandler(INetHandler aHandler) { + if (aHandler instanceof NetHandlerPlayServer) { + mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; + } + } + + @Override + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); + + aOut.writeByte(side); + aOut.writeInt(coverID); + + aOut.writeInt(dimID); + + aOut.writeInt(mPublicChannel); + aOut.writeInt(mCheckBoxValue); + } + + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { + return new GT_Packet_WirelessRedstoneCover( + aData.readInt(), + aData.readShort(), + aData.readInt(), + + aData.readByte(), + aData.readInt(), + + aData.readInt(), + + aData.readInt(), + aData.readInt()); + } + + @Override + public void process(IBlockAccess aWorld) { + World world = DimensionManager.getWorld(dimID); + 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 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 488e25591f..2949ec6791 100644 --- a/src/main/java/gregtech/api/net/IGT_NetworkHandler.java +++ b/src/main/java/gregtech/api/net/IGT_NetworkHandler.java @@ -4,12 +4,13 @@ import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; +@SuppressWarnings("deprecation") public interface IGT_NetworkHandler { - public void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer); + void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer); - public void sendToAllAround(GT_Packet aPacket, TargetPoint aPosition); + void sendToAllAround(GT_Packet aPacket, TargetPoint aPosition); - public void sendToServer(GT_Packet aPacket); + void sendToServer(GT_Packet aPacket); - public void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ); -}
\ No newline at end of file + void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ); +} diff --git a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java index 8b26ef6423..ad51d307fe 100644 --- a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java +++ b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java @@ -9,15 +9,17 @@ import net.minecraftforge.common.util.ForgeDirection; @Optional.Interface(iface = "appeng.api.storage.IExternalStorageHandler", modid = "appliedenergistics2", striprefs = true) public class AE2DigitalChestHandler implements appeng.api.storage.IExternalStorageHandler { + @Override @Optional.Method(modid = "appliedenergistics2") public boolean canHandle(final TileEntity te, final ForgeDirection d, final appeng.api.storage.StorageChannel chan, final appeng.api.networking.security.BaseActionSource mySrc) { return chan == appeng.api.storage.StorageChannel.ITEMS && te instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase; } + @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) { if (chan == appeng.api.storage.StorageChannel.ITEMS) { - return new appeng.me.storage.MEMonitorIInventory(new appeng.util.inv.IMEAdaptor((GT_MetaTileEntity_DigitalChestBase) (((BaseMetaTileEntity) te).getMetaTileEntity()), src)); + return ((GT_MetaTileEntity_DigitalChestBase) (((BaseMetaTileEntity) te).getMetaTileEntity())); } return null; } diff --git a/src/main/java/gregtech/api/objects/ElementStack.java b/src/main/java/gregtech/api/objects/ElementStack.java index 978e5e65c8..d241276103 100644 --- a/src/main/java/gregtech/api/objects/ElementStack.java +++ b/src/main/java/gregtech/api/objects/ElementStack.java @@ -39,4 +39,4 @@ public class ElementStack implements Cloneable { public int hashCode() { return mElement.hashCode(); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_ArrayList.java b/src/main/java/gregtech/api/objects/GT_ArrayList.java index d16974bc78..8c491e86c4 100644 --- a/src/main/java/gregtech/api/objects/GT_ArrayList.java +++ b/src/main/java/gregtech/api/objects/GT_ArrayList.java @@ -57,4 +57,4 @@ public class GT_ArrayList<E> extends ArrayList<E> { if (!mAllowNulls) {size_sS=size(); for (int i = 0; i < size_sS; i++) if (get(i) == null) {remove(i--);size_sS=size();}} return rReturn; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_ChunkManager.java b/src/main/java/gregtech/api/objects/GT_ChunkManager.java index 0012bc78f4..2f1d2c3381 100644 --- a/src/main/java/gregtech/api/objects/GT_ChunkManager.java +++ b/src/main/java/gregtech/api/objects/GT_ChunkManager.java @@ -7,8 +7,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Log; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommandSender; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.ChunkCoordIntPair; @@ -74,7 +72,7 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback // Request a chunk to be loaded for this machine // may pass null chunk to load just the machine itself, if "alwaysReloadChunkloaders" is enabled in config - static public boolean requestPlayerChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ, String player) { + public static boolean requestPlayerChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ, String player) { if (!GT_Values.enableChunkloaders) return false; if (!GT_Values.alwaysReloadChunkloaders && chunkXZ == null) @@ -84,11 +82,11 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback if (instance.registeredTickets.containsKey(owner)) { ForgeChunkManager.forceChunk(instance.registeredTickets.get(owner), chunkXZ); } else { - Ticket ticket = null; - if (player != "") - ticket = ForgeChunkManager.requestPlayerTicket(GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); - 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 (ticket == null) { if (GT_Values.debugChunkloaders) GT_Log.out.println("GT_ChunkManager: ForgeChunkManager.requestTicket failed"); @@ -102,17 +100,17 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback tag.setInteger("OwnerZ", owner.zCoord); ForgeChunkManager.forceChunk(ticket, chunkXZ); if (GT_Values.alwaysReloadChunkloaders) - ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(owner.xCoord << 4, owner.zCoord << 4)); + ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(owner.xCoord >> 4, owner.zCoord >> 4)); instance.registeredTickets.put(owner, ticket); } return true; } - static public boolean requestChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ) { + public static boolean requestChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ) { return requestPlayerChunkLoad(owner, chunkXZ, ""); } - static public void releaseChunk(TileEntity owner, ChunkCoordIntPair chunkXZ) { + public static void releaseChunk(TileEntity owner, ChunkCoordIntPair chunkXZ) { if (!GT_Values.enableChunkloaders) return; Ticket ticket = instance.registeredTickets.get(owner); @@ -123,7 +121,7 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback } } - static public void releaseTicket(TileEntity owner) { + public static void releaseTicket(TileEntity owner) { if (!GT_Values.enableChunkloaders) return; Ticket ticket = instance.registeredTickets.get(owner); diff --git a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java index 59059fce8a..61136c8f40 100644 --- a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java +++ b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java @@ -2,11 +2,16 @@ package gregtech.api.objects; import gregtech.api.enums.Dyes; import gregtech.api.interfaces.ITexture; +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.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; +/** + * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. + */ +@Deprecated public class GT_CopiedBlockTexture implements ITexture { private final Block mBlock; private final byte mSide, mMeta; @@ -36,55 +41,67 @@ public class GT_CopiedBlockTexture implements ITexture { this(aBlock, aSide, aMeta, Dyes._NULL.mRGBa); } - private final IIcon getIcon(int aSide) { + private IIcon getIcon(int aSide) { if (mSide == 6) return mBlock.getIcon(aSide, mMeta); return mBlock.getIcon(mSide, mMeta); } @Override public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(5); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); -// aRenderer.flipTexture = !aRenderer.flipTexture; + IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal()); + aRenderer.field_152631_f = true; + new LightingHelper(aRenderer) + .setupLightingXPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); -// aRenderer.flipTexture = !aRenderer.flipTexture; + aRenderer.field_152631_f = false; } @Override public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(4); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); + IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal()); + new LightingHelper(aRenderer) + .setupLightingXNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); } @Override public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(1); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 1.0F), (int) (mRGBa[1] * 1.0F), (int) (mRGBa[2] * 1.0F), mAllowAlpha ? 255 - mRGBa[3] : 255); + IIcon aIcon = getIcon(ForgeDirection.UP.ordinal()); + new LightingHelper(aRenderer) + .setupLightingYPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.UP.ordinal(), 0xffffff); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); } @Override public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(0); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255); + IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal()); + new LightingHelper(aRenderer) + .setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); } @Override public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(3); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); + IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal()); + new LightingHelper(aRenderer) + .setupLightingZPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); } @Override public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - IIcon aIcon = getIcon(2); - Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); -// aRenderer.flipTexture = !aRenderer.flipTexture; + IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal()); + aRenderer.field_152631_f = true; + new LightingHelper(aRenderer) + .setupLightingZNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); -// aRenderer.flipTexture = !aRenderer.flipTexture; + aRenderer.field_152631_f = false; } @Override @@ -99,4 +116,4 @@ public class GT_CopiedBlockTexture implements ITexture { public byte getMeta() { return mMeta; } -}
\ No newline at end of file +} 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 fa6d3bcc26..07665f7f7d 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_Default.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_Default.java @@ -65,4 +65,4 @@ public class GT_Cover_Default extends GT_CoverBehavior { public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return (aCoverVariable & 8) != 0; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_Fluid.java b/src/main/java/gregtech/api/objects/GT_Fluid.java index 119b32a22b..4f5c2a3ca2 100644 --- a/src/main/java/gregtech/api/objects/GT_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_Fluid.java @@ -25,4 +25,4 @@ public class GT_Fluid extends Fluid implements Runnable { public void run() { setIcons(GregTech_API.sBlockIcons.registerIcon(RES_PATH_BLOCK + "fluids/fluid." + mTextureName)); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java index 96f8fc6849..bf4b7239fd 100644 --- a/src/main/java/gregtech/api/objects/GT_FluidStack.java +++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java @@ -73,4 +73,4 @@ public class GT_FluidStack extends FluidStack { public String toString() { return String.format("GT_FluidStack: %s x %s, ID:%s", this.amount, this.getFluid().getName(), this.getFluidID()); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_HashSet.java b/src/main/java/gregtech/api/objects/GT_HashSet.java index cec006905b..a8c0928d39 100644 --- a/src/main/java/gregtech/api/objects/GT_HashSet.java +++ b/src/main/java/gregtech/api/objects/GT_HashSet.java @@ -79,4 +79,4 @@ public class GT_HashSet<E extends GT_ItemStack> extends AbstractSet<E> { public void clear() { map.clear(); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_ItemStack.java b/src/main/java/gregtech/api/objects/GT_ItemStack.java index 9791cadeeb..7284854c5f 100644 --- a/src/main/java/gregtech/api/objects/GT_ItemStack.java +++ b/src/main/java/gregtech/api/objects/GT_ItemStack.java @@ -50,4 +50,4 @@ public class GT_ItemStack { public int hashCode() { return GT_Utility.stackToInt(toStack()); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_MultiTexture.java b/src/main/java/gregtech/api/objects/GT_MultiTexture.java index 8f1dbc7a62..9d664b4dfb 100644 --- a/src/main/java/gregtech/api/objects/GT_MultiTexture.java +++ b/src/main/java/gregtech/api/objects/GT_MultiTexture.java @@ -5,10 +5,11 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; /** - * Lets Multiple ITextures Render overlay over each other. - * <p/> - * I should have done this much earlier... + * <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 implements ITexture { private final ITexture[] mTextures; @@ -56,4 +57,4 @@ public class GT_MultiTexture implements ITexture { public boolean isValidTexture() { return true; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java index 074cabf341..12d013303c 100644 --- a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java @@ -4,14 +4,17 @@ import gregtech.api.enums.Dyes; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; +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.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public class GT_RenderedTexture implements ITexture, IColorModulationContainer { - private final IIconContainer mIconContainer; - private final boolean mAllowAlpha; + final IIconContainer mIconContainer; + final boolean mAllowAlpha; /** * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!! * <p/> @@ -37,74 +40,157 @@ public class GT_RenderedTexture implements ITexture, IColorModulationContainer { @Override public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); aRenderer.field_152631_f = true; + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingXPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.EAST.ordinal(), mRGBa); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(153, 153, 153, 255); + lighting.setupColor(ForgeDirection.EAST.ordinal(), 0xffffff); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } aRenderer.field_152631_f = false; } - @Override public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingXNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.WEST.ordinal(), mRGBa); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(153, 153, 153, 255); + lighting.setupColor(ForgeDirection.WEST.ordinal(), 0xffffff); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } } @Override public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 1.0F), (int) (mRGBa[1] * 1.0F), (int) (mRGBa[2] * 1.0F), mAllowAlpha ? 255 - mRGBa[3] : 255); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.UP.ordinal(), mRGBa); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(255, 255, 255, 255); + lighting.setupColor(ForgeDirection.UP.ordinal(), 0xffffff); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } } @Override public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.field_152631_f = true; - aRenderer.flipTexture = true; - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + final Tessellator tessellator = Tessellator.instance; + IIcon aIcon = mIconContainer.getIcon(); + + float minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + float maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + float minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + float maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + double minX = aX + aRenderer.renderMinX; + double maxX = aX + aRenderer.renderMaxX; + double minY = aY + aRenderer.renderMinY; + double minZ = aZ + aRenderer.renderMinZ; + double maxZ = aZ + aRenderer.renderMaxZ; + + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); + + if (aRenderer.enableAO) { + tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft); + tessellator.setBrightness(aRenderer.brightnessTopLeft); + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft); + tessellator.setBrightness(aRenderer.brightnessBottomLeft); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight); + tessellator.setBrightness(aRenderer.brightnessBottomRight); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight); + tessellator.setBrightness(aRenderer.brightnessTopRight); + } else { + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + } + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); + if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(128, 128, 128, 255); - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + minX = aX + (float)aRenderer.renderMinX; + maxX = aX + (float)aRenderer.renderMaxX; + minY = aY + (float)aRenderer.renderMinY; + minZ = aZ + (float)aRenderer.renderMinZ; + maxZ = aZ + (float)aRenderer.renderMaxZ; + + lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); + + if (aRenderer.enableAO) { + tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft); + tessellator.setBrightness(aRenderer.brightnessTopLeft); + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft); + tessellator.setBrightness(aRenderer.brightnessBottomLeft); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight); + tessellator.setBrightness(aRenderer.brightnessBottomRight); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight); + tessellator.setBrightness(aRenderer.brightnessTopRight); + } else { + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + } + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); } - aRenderer.field_152631_f = false; - aRenderer.flipTexture = false; } @Override public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingZPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(204, 204, 204, 255); + lighting.setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } } @Override public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tesselator = Tessellator.instance; - tesselator.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); aRenderer.field_152631_f = true; + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingZNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { - tesselator.setColorRGBA(204, 204, 204, 255); + lighting.setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } aRenderer.field_152631_f = false; @@ -119,4 +205,4 @@ public class GT_RenderedTexture implements ITexture, IColorModulationContainer { public boolean isValidTexture() { return mIconContainer != null; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_SidedTexture.java b/src/main/java/gregtech/api/objects/GT_SidedTexture.java index ab88225781..c6ed003be9 100644 --- a/src/main/java/gregtech/api/objects/GT_SidedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_SidedTexture.java @@ -6,11 +6,13 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; +/** + * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. + */ +@Deprecated public class GT_SidedTexture implements ITexture, IColorModulationContainer { - private final IIconContainer[] mIconContainer; - private final boolean mAllowAlpha; + private final ITexture[] mTextures; /** * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!! * <p/> @@ -21,8 +23,14 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer { public 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"); - mIconContainer = new IIconContainer[]{aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5}; - mAllowAlpha = aAllowAlpha; + mTextures = new ITexture[]{ + new GT_RenderedTexture(aIcon0, aRGBa, aAllowAlpha), + new GT_RenderedTexture(aIcon1, aRGBa, aAllowAlpha), + new GT_RenderedTexture(aIcon2, aRGBa, aAllowAlpha), + new GT_RenderedTexture(aIcon3, aRGBa, aAllowAlpha), + new GT_RenderedTexture(aIcon4, aRGBa, aAllowAlpha), + new GT_RenderedTexture(aIcon5, aRGBa, aAllowAlpha) + }; mRGBa = aRGBa; } @@ -44,76 +52,32 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer { @Override public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.field_152631_f = true; - aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer[5].getIcon()); - if (mIconContainer[5].getOverlayIcon() != null) { - tessellator.setColorRGBA(153, 153, 153, 255); - aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer[5].getOverlayIcon()); - } - aRenderer.field_152631_f = false; + mTextures[5].renderXPos(aRenderer, aBlock, aX ,aY, aZ); } @Override public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer[4].getIcon()); - if (mIconContainer[4].getOverlayIcon() != null) { - tessellator.setColorRGBA(153, 153, 153, 255); - aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer[4].getOverlayIcon()); - } + mTextures[4].renderXNeg(aRenderer, aBlock, aX ,aY, aZ); } @Override public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 1.0F), (int) (mRGBa[1] * 1.0F), (int) (mRGBa[2] * 1.0F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer[1].getIcon()); - if (mIconContainer[1].getOverlayIcon() != null) { - tessellator.setColorRGBA(255, 255, 255, 255); - aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer[1].getOverlayIcon()); - } + mTextures[1].renderYPos(aRenderer, aBlock, aX ,aY, aZ); } @Override public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.field_152631_f = true; - aRenderer.flipTexture = true; - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer[1].getIcon()); - if (mIconContainer[0].getOverlayIcon() != null) { - tessellator.setColorRGBA(128, 128, 128, 255); - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer[1].getOverlayIcon()); - } - aRenderer.field_152631_f = false; - aRenderer.flipTexture = false; + mTextures[0].renderYNeg(aRenderer, aBlock, aX ,aY, aZ); } @Override public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer[3].getIcon()); - if (mIconContainer[3].getOverlayIcon() != null) { - tessellator.setColorRGBA(204, 204, 204, 255); - aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer[3].getOverlayIcon()); - } + mTextures[3].renderZPos(aRenderer, aBlock, aX ,aY, aZ); } @Override public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - final Tessellator tessellator = Tessellator.instance; - tessellator.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); - aRenderer.field_152631_f = true; - aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer[2].getIcon()); - if (mIconContainer[2].getOverlayIcon() != null) { - tessellator.setColorRGBA(204, 204, 204, 255); - aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer[2].getOverlayIcon()); - } - aRenderer.field_152631_f = false; + mTextures[2].renderZNeg(aRenderer, aBlock, aX ,aY, aZ); } @Override @@ -123,6 +87,9 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer { @Override public boolean isValidTexture() { - return mIconContainer != null && mIconContainer[0] != null && mIconContainer[1] != null && mIconContainer[2] != null && mIconContainer[3] != null && mIconContainer[4] != null && mIconContainer[5] != null; + for (ITexture renderedTexture : mTextures) { + if (!renderedTexture.isValidTexture()) return false; + } + return true; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java b/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java new file mode 100644 index 0000000000..0dd405c792 --- /dev/null +++ b/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java @@ -0,0 +1,45 @@ +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; + +/** + * 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 +public class GT_StdRenderedTexture extends GT_RenderedTexture{ + + @SuppressWarnings("unused") + public GT_StdRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { + super(aIcon, aRGBa, aAllowAlpha); + } + + public GT_StdRenderedTexture(IIconContainer aIcon, short[] aRGBa) { + super(aIcon, aRGBa, true); + } + + @SuppressWarnings("unused") + public GT_StdRenderedTexture(IIconContainer aIcon) { + super(aIcon, Dyes._NULL.mRGBa); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); + aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); + aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + } +} 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 8a4b61065c..d06772dc1e 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -58,4 +58,4 @@ public class GT_UO_Fluid { double amount = min+aRandom.nextInt(div)+aRandom.nextDouble(); return (int) (Math.pow(amount, 5) / 100);//reverses the computation above } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/ItemData.java b/src/main/java/gregtech/api/objects/ItemData.java index 3ca1fad5d8..ce77d222aa 100644 --- a/src/main/java/gregtech/api/objects/ItemData.java +++ b/src/main/java/gregtech/api/objects/ItemData.java @@ -121,4 +121,4 @@ public class ItemData { if (mPrefix == null || mMaterial == null || mMaterial.mMaterial == null) return ""; return String.valueOf(new StringBuilder().append(mPrefix.name()).append(mMaterial.mMaterial.mName)); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index 4392d60a07..e4c135cc73 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -59,4 +59,4 @@ public class MaterialStack implements Cloneable { public int hashCode() { return mMaterial.hashCode(); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java new file mode 100644 index 0000000000..cb9e7d4d83 --- /dev/null +++ b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java @@ -0,0 +1,43 @@ +package gregtech.api.objects; + +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; +import net.minecraft.item.ItemStack; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.Optional; +import java.util.Queue; + +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; + +public class ReverseShapedRecipe { + private static Queue<ReverseShapedRecipe> reverseRecipes = new LinkedList<>(); + private ItemStack aResult; + private Object[] aRecipe; + + public static Queue<ReverseShapedRecipe> getReverseRecipes() { + return reverseRecipes; + } + + public ReverseShapedRecipe(ItemStack output, Object[] aRecipe) { + this.aResult = output; + this.aRecipe = aRecipe; + reverseRecipes.add(this); + } + + public static void runReverseRecipes() { + for (ReverseShapedRecipe x : reverseRecipes) { + Optional<GT_Recipe> recipeOptional = GT_Utility.reverseShapedRecipe(x.aResult, x.aRecipe); + 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)); + + 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 new file mode 100644 index 0000000000..1c5e27d246 --- /dev/null +++ b/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java @@ -0,0 +1,43 @@ +package gregtech.api.objects; + +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; +import net.minecraft.item.ItemStack; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.Optional; +import java.util.Queue; + +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; + +public class ReverseShapelessRecipe { + private static Queue<ReverseShapelessRecipe> reverseRecipes = new LinkedList<>(); + private ItemStack aResult; + private Object[] aRecipe; + + public static Queue<ReverseShapelessRecipe> getReverseRecipes() { + return reverseRecipes; + } + + public ReverseShapelessRecipe(ItemStack output, Object[] aRecipe) { + this.aResult = output; + this.aRecipe = aRecipe; + reverseRecipes.add(this); + } + + public static void runReverseRecipes() { + for (ReverseShapelessRecipe x : reverseRecipes) { + Optional<GT_Recipe> recipeOptional = GT_Utility.reverseShapelessRecipe(x.aResult, x.aRecipe); + 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)); + + 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 22bcf91dbe..a2c4906345 100644 --- a/src/main/java/gregtech/api/objects/XSTR.java +++ b/src/main/java/gregtech/api/objects/XSTR.java @@ -44,7 +44,7 @@ public class XSTR extends Random { 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 final static XSTR XSTR_INSTANCE=new XSTR(){ + public static final XSTR XSTR_INSTANCE=new XSTR(){ @Override public synchronized void setSeed(long seed) { if(!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) @@ -86,10 +86,12 @@ public class XSTR extends Random { public XSTR(long seed) { this.seed = seed; } + @Override public boolean nextBoolean() { return next(1) != 0; } + @Override public double nextDouble() { return (((long)(next(26)) << 27) + next(27)) * DOUBLE_UNIT; } @@ -109,6 +111,7 @@ public class XSTR extends Random { * * @param seed the new seed */ + @Override public synchronized void setSeed(long seed) { this.seed = seed; } @@ -129,6 +132,7 @@ public class XSTR extends Random { * @param nbits * @return */ + @Override public int next(int nbits) { long x = seed; x ^= (x << 21); @@ -140,7 +144,8 @@ public class XSTR extends Random { } boolean haveNextNextGaussian = false; double nextNextGaussian = 0; - synchronized public double nextGaussian() { + @Override + public synchronized double nextGaussian() { // See Knuth, ACP, Section 3.4.1 Algorithm C. if (haveNextNextGaussian) { haveNextNextGaussian = false; @@ -213,6 +218,7 @@ public class XSTR extends Random { * @throws IllegalArgumentException if bound is not positive * @since 1.2 */ + @Override public int nextInt(int bound) { //if (bound <= 0) { //throw new RuntimeException("BadBound"); @@ -238,19 +244,23 @@ public class XSTR extends Random { int out = (int) last % bound; return (out < 0) ? -out : out; } + @Override public int nextInt() { return next(32); } + @Override public float nextFloat() { return next(24) * FLOAT_UNIT; } + @Override public long nextLong() { // it's okay that the bottom word remains signed. return ((long)(next(32)) << 32) + next(32); } + @Override public void nextBytes(byte[] bytes_arr) { for (int iba = 0, lenba = bytes_arr.length; iba < lenba; ) for (int rndba = nextInt(), @@ -258,4 +268,4 @@ public class XSTR extends Random { nba-- > 0; rndba >>= Byte.SIZE) bytes_arr[iba++] = (byte)rndba; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/render/TextureFactory.java b/src/main/java/gregtech/api/render/TextureFactory.java new file mode 100644 index 0000000000..8c67cd6740 --- /dev/null +++ b/src/main/java/gregtech/api/render/TextureFactory.java @@ -0,0 +1,126 @@ +package gregtech.api.render; + +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 + * // 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> + * See: the {@link ITextureBuilder} interface + */ +@SuppressWarnings("unused") +public final class TextureFactory { + private TextureFactory() { + throw new AssertionError("Non-instantiable class"); + } + + /** + * Multi-layered {@link ITexture} factory + * + * @param textures The layers of {@link ITexture} from bottom to top + * @return The instance of an {@link ITexture} implementation + */ + public static ITexture of(final ITexture... textures) { + return builder().addLayer(textures).build(); + } + + /** + * All-Sided {@link ITexture} factory + * + * @param bottom The {@link IIconContainer} Icon for the Bottom Side. + * @param top The {@link IIconContainer} Icon for the Top Side. + * @param north The {@link IIconContainer} Icon for the North Side. + * @param south The {@link IIconContainer} Icon for the South Side. + * @param west The {@link IIconContainer} Icon for the West Side. + * @param east The {@link IIconContainer} Icon for the East Side. + * @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(); + } + + /** + * Bottom-Top-Sides-Sided {@link ITexture} factory + * + * @param bottom The {@link IIconContainer} Icon for the Bottom Side. + * @param top The {@link IIconContainer} Icon for the Top Side. + * @param sides The {@link IIconContainer} Icon for the North, South, West and East Sides. + * @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(); + } + + /** + * Rendered {@link ITexture} factory + * + * @param iconContainer The {@link IIconContainer} to render + * @param rgba The {@code short[]} RGBA tint for the texture. + * @param allowAlpha Determine if texture will use alpha blending (Not yet implemented) + * @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(); + } + + public static ITexture of(final IIconContainer iconContainer, final short[] rgba) { + return builder().addIcon(iconContainer).setRGBA(rgba).build(); + } + + public static ITexture of(final IIconContainer iconContainer) { + return builder().addIcon(iconContainer).build(); + } + + /** + * 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 + * @param side The {@link ForgeDirection} side providing the texture + * @param rgba The RGBA tint to apply + * @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(); + } + + public static ITexture of(final Block block, final int meta, final ForgeDirection side) { + return builder().setFromBlock(block, meta).setFromSide(side).build(); + } + + public static ITexture of(final Block block, final int meta) { + return builder().setFromBlock(block, meta).build(); + } + + public static ITexture of(final Block block) { + return of(block, 0); + } + + /** + * {@link ITextureBuilder} factory + * + * @return An instance of the {@link ITextureBuilder} implementation + */ + public static ITextureBuilder builder() { + return new GT_TextureBuilder(); + } +} 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 new file mode 100644 index 0000000000..7093184533 --- /dev/null +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java @@ -0,0 +1,69 @@ +package gregtech.api.threads; + +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); + } + + public static void setCableUpdateValues(World aWorld, ChunkCoordinates aCoords) { + if (isEnabled) { + EXECUTOR_SERVICE.submit(new GT_Runnable_Cable_Update(aWorld, aCoords)); + } + } + + @Override + public void run() { + try { + while (!tQueue.isEmpty()) { + final ChunkCoordinates aCoords = tQueue.poll(); + final TileEntity tTileEntity; + + GT_Proxy.TICK_LOCK.lock(); + try { + //we dont want to go over cables that are in unloaded chunks + //keeping the lock just to make sure no CME happens + if (world.blockExists(aCoords.posX, aCoords.posY, aCoords.posZ)) { + tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); + } else { + tTileEntity = null; + } + } finally { + GT_Proxy.TICK_LOCK.unlock(); + } + + // See if the block itself needs an update + if (tTileEntity instanceof IMachineBlockUpdateable) + ((IMachineBlockUpdateable) tTileEntity).onMachineBlockUpdate(); + + // Now see if we should add the nearby blocks to the queue: + // only add blocks the cable is connected to + if (tTileEntity instanceof BaseMetaPipeEntity && + ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) + { + ChunkCoordinates tCoords; + for (byte i = 0;i<6;i++) { + if (((GT_MetaPipeEntity_Cable) ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity()).isConnectedAtSide(i)) { + ForgeDirection offset = ForgeDirection.getOrientation(i); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + offset.offsetX, + aCoords.posY + offset.offsetY, aCoords.posZ + offset.offsetZ))) + tQueue.add(tCoords); + } + } + } + } + } catch (Exception e) { + GT_Mod.GT_FML_LOGGER.error( + "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 ee56a0b0c0..cc224b977d 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -3,11 +3,14 @@ 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 net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; +import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import java.util.HashSet; +import java.util.LinkedList; +import java.util.Queue; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -15,25 +18,26 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; public class GT_Runnable_MachineBlockUpdate implements Runnable { - //used by runner thread - private final int x, y, z; - private final World world; - private final Set<ChunkPosition> visited = new HashSet<>(80); - - //Threading + // used by runner thread + protected final ChunkCoordinates mCoords; + protected final World world; + protected final Set<ChunkCoordinates> visited = new HashSet<>(80); + protected final Queue<ChunkCoordinates> tQueue = new LinkedList<>(); + + // Threading private static final ThreadFactory THREAD_FACTORY = r -> { Thread thread = new Thread(r); thread.setName("GT_MachineBlockUpdate"); return thread; }; - private static ExecutorService EXECUTOR_SERVICE; + protected static ExecutorService EXECUTOR_SERVICE; - //This class should never be initiated outside of this class! - private GT_Runnable_MachineBlockUpdate(World aWorld, int aX, int aY, int aZ) { + // This class should never be initiated outside of this class! + protected GT_Runnable_MachineBlockUpdate(World aWorld, ChunkCoordinates aCoords) { this.world = aWorld; - this.x = aX; - this.y = aY; - this.z = aZ; + this.mCoords = aCoords; + visited.add(aCoords); + tQueue.add(aCoords); } public static boolean isEnabled() { @@ -52,18 +56,16 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { GT_Runnable_MachineBlockUpdate.isEnabled = isEnabled; } - private static boolean isEnabled = true; + protected static boolean isEnabled = true; - public static void setMachineUpdateValues(World aWorld, int aX, int aY, int aZ) { - if (isEnabled) - EXECUTOR_SERVICE.submit(new GT_Runnable_MachineBlockUpdate(aWorld, aX, aY, aZ)); + public static void setMachineUpdateValues(World aWorld, ChunkCoordinates aCoords) { + if (isEnabled) { + EXECUTOR_SERVICE.submit(new GT_Runnable_MachineBlockUpdate(aWorld, aCoords)); + } } public static void initExecutorService() { - EXECUTOR_SERVICE = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), THREAD_FACTORY); - //Executors.newSingleThreadExecutor(THREAD_FACTORY); - //Executors.newCachedThreadPool(THREAD_FACTORY); - //Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(),THREAD_FACTORY); + EXECUTOR_SERVICE = Executors.newFixedThreadPool((Runtime.getRuntime().availableProcessors() * 2 / 3), THREAD_FACTORY); } public static void shutdownExecutorService() { @@ -85,7 +87,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { // Preserve interrupt status Thread.currentThread().interrupt(); }catch (Exception e){ - GT_Mod.GT_FML_LOGGER.error("Well this didn't terminated well...",e); + GT_Mod.GT_FML_LOGGER.error("Well this didn't terminated well...", e); // (Re-)Cancel in case EXECUTOR_SERVICE.shutdownNow(); }finally { @@ -93,70 +95,50 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { } } - private boolean shouldRecurse(TileEntity aTileEntity, int aX, int aY, int aZ) { - //no check on IGregTechTileEntity as it should call the underlying meta tile isMachineBlockUpdateRecursive - //if (aTileEntity instanceof IGregTechTileEntity) { - // return ((IGregTechTileEntity) aTileEntity).isMachineBlockUpdateRecursive(); - //} - return (aTileEntity instanceof IMachineBlockUpdateable && - ((IMachineBlockUpdateable) aTileEntity).isMachineBlockUpdateRecursive()) || - GregTech_API.isMachineBlock(world.getBlock(aX, aY, aZ), world.getBlockMetadata(aX, aY, aZ)); - } - - private void causeUpdate(TileEntity tileEntity) { - //no check for IGregTechTileEntity as it should call the underlying meta tile onMachineBlockUpdate - if (tileEntity instanceof IMachineBlockUpdateable) { - ((IMachineBlockUpdateable) tileEntity).onMachineBlockUpdate(); - } - } - - private void stepToUpdateMachine(int aX, int aY, int aZ) { - if (!visited.add(new ChunkPosition(aX, aY, aZ))) - return; - TileEntity tTileEntity = world.getTileEntity(aX, aY, aZ); - - causeUpdate(tTileEntity); - - if (visited.size() < 5 || shouldRecurse(tTileEntity, aX, aY, aZ)) { - stepToUpdateMachine(aX + 1, aY, aZ); - stepToUpdateMachine(aX - 1, aY, aZ); - stepToUpdateMachine(aX, aY + 1, aZ); - stepToUpdateMachine(aX, aY - 1, aZ); - stepToUpdateMachine(aX, aY, aZ + 1); - stepToUpdateMachine(aX, aY, aZ - 1); - } - } - @Override public void run() { try { - stepToUpdateMachine(x, y, z); + while (!tQueue.isEmpty()) { + final ChunkCoordinates aCoords = tQueue.poll(); + final TileEntity tTileEntity; + final boolean isMachineBlock; + + // This might load a chunk... which might load a TileEntity... which might get added to `loadedTileEntityList`... which might be in the process + // of being iterated over during `UpdateEntities()`... which might cause a ConcurrentModificationException. So, lock that shit. + GT_Proxy.TICK_LOCK.lock(); + try { + tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); + isMachineBlock = GregTech_API.isMachineBlock(world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ), world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ)); + } finally { + GT_Proxy.TICK_LOCK.unlock(); + } + + // See if the block itself needs an update + if (tTileEntity instanceof IMachineBlockUpdateable) + ((IMachineBlockUpdateable) tTileEntity).onMachineBlockUpdate(); + + // Now see if we should add the nearby blocks to the queue: + // 1) If we've visited less than 5 blocks, then yes + // 2) If the tile says we should recursively updated (pipes don't, machine blocks do) + // 3) If the block at the coordinates is marked as a machine block + if (visited.size() < 5 + || (tTileEntity instanceof IMachineBlockUpdateable && ((IMachineBlockUpdateable) tTileEntity).isMachineBlockUpdateRecursive()) + || isMachineBlock) + { + ChunkCoordinates tCoords; + + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) tQueue.add(tCoords); + } + } } catch (Exception e) { - GT_Mod.GT_FML_LOGGER.error("Well this update was broken... " + new Coordinates(x, y, z, world), e); + GT_Mod.GT_FML_LOGGER.error( + "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " + world.provider.dimensionId + "}", e); } } - public static class Coordinates { - public final int mX; - public final int mY; - public final int mZ; - public final World mWorld; - - public Coordinates(int mX, int mY, int mZ, World mWorld) { - this.mX = mX; - this.mY = mY; - this.mZ = mZ; - this.mWorld = mWorld; - } - - @Override - public String toString() { - return "Coordinates{" + - "mX=" + mX + - ", mY=" + mY + - ", mZ=" + mZ + - ", mWorld=" + mWorld.getProviderName() + " @dimId " + mWorld.provider.dimensionId + - '}'; - } - } } 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 6588780624..dad93ff98c 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java @@ -31,4 +31,4 @@ public class GT_Runnable_Sound implements Runnable { GT_Utility.sPlayedSoundMap.put(tSound, mTimeUntilNextSound); } catch (Throwable e) {/**/} } -}
\ No newline at end of file +} 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 358e21a9a6..1769a4770a 100644 --- a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java +++ b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java @@ -339,4 +339,4 @@ public class GT_Assemblyline_Server { internal3 = null; internal4 = null; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java index 41bdcac3dc..c06bf82b89 100644 --- a/src/main/java/gregtech/api/util/GT_BaseCrop.java +++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java @@ -119,6 +119,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { return tier() * mGrowthSpeed; } + @Override public int getrootslength(ICropTile crop) { return 5; } @@ -233,6 +234,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { return false; } + @Override public List<String> getCropInformation() { if (mBlock != null) { ArrayList<String> result = new ArrayList<String>(1); @@ -242,6 +244,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { return null; } + @Override public ItemStack getDisplayItem() { if (mSpecialDrops != null && mSpecialDrops[mSpecialDrops.length - 1] != null) { return GT_Utility.copy(mSpecialDrops[mSpecialDrops.length - 1]); diff --git a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java index 4adf7e0f26..f25b88728d 100644 --- a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java @@ -178,4 +178,4 @@ public abstract class GT_CircuitryBehavior { public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { return null; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_ClientPreference.java b/src/main/java/gregtech/api/util/GT_ClientPreference.java new file mode 100644 index 0000000000..e679f4ece6 --- /dev/null +++ b/src/main/java/gregtech/api/util/GT_ClientPreference.java @@ -0,0 +1,24 @@ +package gregtech.api.util; + +public class GT_ClientPreference { + private final boolean mSingleBlockInitialFilter; + private final boolean mInputBusInitialFilter; + + public GT_ClientPreference(boolean mSingleBlockInitialFilter, boolean mInputBusInitialFilter) { + this.mSingleBlockInitialFilter = mSingleBlockInitialFilter; + this.mInputBusInitialFilter = mInputBusInitialFilter; + } + + public GT_ClientPreference(GT_Config aClientDataFile) { + this.mSingleBlockInitialFilter = aClientDataFile.get("preference", "mSingleBlockInitialFilter", false); + this.mInputBusInitialFilter = aClientDataFile.get("preference", "mInputBusInitialFilter", true); + } + + public boolean isSingleBlockInitialFilterEnabled() { + return mSingleBlockInitialFilter; + } + + public boolean isInputBusInitialFilterEnabled() { + return mInputBusInitialFilter; + } +} diff --git a/src/main/java/gregtech/api/util/GT_Config.java b/src/main/java/gregtech/api/util/GT_Config.java index 23a43f7085..6849988a77 100644 --- a/src/main/java/gregtech/api/util/GT_Config.java +++ b/src/main/java/gregtech/api/util/GT_Config.java @@ -96,4 +96,4 @@ public class GT_Config implements Runnable { public void run() { mConfig.save(); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_CoverBehavior.java b/src/main/java/gregtech/api/util/GT_CoverBehavior.java index c0ad751add..ebd3a98d55 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehavior.java @@ -15,6 +15,9 @@ import static gregtech.api.enums.GT_Values.E; * For Covers with a special behavior. */ public abstract class GT_CoverBehavior { + + public EntityPlayer lastPlayer = null; + /** * Called by updateEntity inside the covered TileEntity. aCoverVariable is the Value you returned last time. */ @@ -54,6 +57,7 @@ public abstract class GT_CoverBehavior { */ public boolean onCoverShiftRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { if(hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { + lastPlayer = aPlayer; GT_Values.NW.sendToPlayer(new GT_Packet_TileEntityCoverGUI(aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), (EntityPlayerMP) aPlayer); return true; } @@ -241,4 +245,4 @@ public abstract class GT_CoverBehavior { public String trans(String aNr, String aEnglish){ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aNr, aEnglish, false); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_CreativeTab.java b/src/main/java/gregtech/api/util/GT_CreativeTab.java index 80dac95df2..ccebd9d4a9 100644 --- a/src/main/java/gregtech/api/util/GT_CreativeTab.java +++ b/src/main/java/gregtech/api/util/GT_CreativeTab.java @@ -21,4 +21,4 @@ public class GT_CreativeTab extends CreativeTabs { public Item getTabIconItem() { return ItemList.Circuit_Integrated.getItem(); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_FoodStat.java b/src/main/java/gregtech/api/util/GT_FoodStat.java index d0fe9bdbf4..ce89881a5b 100644 --- a/src/main/java/gregtech/api/util/GT_FoodStat.java +++ b/src/main/java/gregtech/api/util/GT_FoodStat.java @@ -68,7 +68,15 @@ public class GT_FoodStat implements IFoodStat { ItemStack tStack = GT_OreDictUnificator.get(GT_Utility.copy(mEmptyContainer)); if (tStack != null && !aPlayer.inventory.addItemStackToInventory(tStack)) aPlayer.dropPlayerItemWithRandomChoice(tStack, true); - aPlayer.worldObj.playSoundAtEntity(aPlayer, "random.burp", 0.5F, aPlayer.worldObj.rand.nextFloat() * 0.1F + 0.9F); + + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() + .setIdentifier("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) { aPlayer.curePotionEffects(new ItemStack(Items.milk_bucket, 1, 0)); @@ -79,7 +87,14 @@ public class GT_FoodStat implements IFoodStat { } } if (mExplosive) { - aPlayer.worldObj.newExplosion(aPlayer, aPlayer.posX, aPlayer.posY, aPlayer.posZ, 4, true, true); + 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); } } @@ -99,4 +114,4 @@ public class GT_FoodStat implements IFoodStat { public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer) { return mIsRotten; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java index fd1d229284..dadbe57518 100644 --- a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java +++ b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java @@ -8,4 +8,4 @@ public class GT_IBoxableWrapper implements IBoxable { public boolean canBeStoredInToolbox(ItemStack itemstack) { return true; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java index c3b7d34eb4..f742be20cb 100644 --- a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java +++ b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java @@ -13,4 +13,4 @@ public class GT_ItsNotMyFaultException extends RuntimeException { public String toString() { return "The GregTech-Addon has a Problem.\nIT'S NOT MY FAULT!!! Below is how to fix it.\n" + mError + "\nDO NOT COME TO ME WITH THIS CRASH. YOU CAUSED IT YOURSELF, AND I TOLD YOU HOW TO FIX IT!!!"; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index c87e0f7417..e0c23fce8e 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -33,8 +33,12 @@ public class GT_LanguageManager { TEMPMAP.put(aKey.trim(), aEnglish); LanguageRegistry.instance().injectLanguage("en_US", TEMPMAP); TEMPMAP.clear(); - if(sUseEnglishFile && !aWriteIntoLangFile && LANGMAP.containsKey(aKey)){ - aEnglish = LANGMAP.get(aKey); + if(sUseEnglishFile && !aWriteIntoLangFile){ + if (!LANGMAP.containsKey(aKey)) { + Property tProperty = sEnglishFile.get("LanguageFile", aKey, aEnglish); + aEnglish = tProperty.getString(); + LANGMAP.put(aKey, aEnglish); + } else aEnglish = LANGMAP.get(aKey); } return aEnglish; } @@ -63,7 +67,12 @@ public class GT_LanguageManager { public static String getTranslation(String aKey) { if (aKey == null) return E; - String tTrimmedKey = aKey.trim(), rTranslation = LanguageRegistry.instance().getStringLocalization(tTrimmedKey); + String tTrimmedKey = aKey.trim(), rTranslation; + if (sUseEnglishFile) { + rTranslation = LanguageRegistry.instance().getStringLocalization(tTrimmedKey); + } else { + rTranslation = StatCollector.translateToLocal(tTrimmedKey); + } if (GT_Utility.isStringInvalid(rTranslation)) { rTranslation = StatCollector.translateToLocal(tTrimmedKey); if (GT_Utility.isStringInvalid(rTranslation) || tTrimmedKey.equals(rTranslation)) { diff --git a/src/main/java/gregtech/api/util/GT_Log.java b/src/main/java/gregtech/api/util/GT_Log.java index c336eed094..888f471317 100644 --- a/src/main/java/gregtech/api/util/GT_Log.java +++ b/src/main/java/gregtech/api/util/GT_Log.java @@ -37,4 +37,4 @@ public class GT_Log { mBufferedOreDictLog.add(aString); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 5cfcac0a89..f82b0ecb7e 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -6,7 +6,12 @@ import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ConfigCategories; +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; @@ -31,7 +36,11 @@ import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.*; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.world.World; @@ -40,11 +49,28 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; import java.util.stream.Collectors; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.B; + +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.GT_Values.DW; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.RA; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.W; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -54,22 +80,28 @@ import static gregtech.api.enums.GT_Values.*; * 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<IRecipe>(1000); - private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<String, ItemStack>(); - private static final List<IRecipe> sAllRecipeList = /*Collections.synchronizedList(*/new ArrayList<IRecipe>(5000)/*)*/, sBufferRecipeList = new ArrayList<IRecipe>(1000); + public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<>(1000); + private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<>(); + + private static final List<IRecipe> sAllRecipeList = new ArrayList<>(5000), sBufferRecipeList = new ArrayList<>(1000); + private static final List<ItemStack> delayedRemovalByOutput = new ArrayList<>(); + private static final List<InventoryCrafting> delayedRemovalByRecipe = new ArrayList<>(); + + public static volatile int VERSION = 509; - public static Collection<String> sNativeRecipeClasses = new HashSet<String>(), sSpecialRecipeClasses = new HashSet<String>(); - public static GT_HashSet<GT_ItemStack> sNonReplaceableItems = new GT_HashSet<GT_ItemStack>(); + public static Collection<String> sNativeRecipeClasses = new HashSet<>(), sSpecialRecipeClasses = new HashSet<>(); + public static GT_HashSet<GT_ItemStack> sNonReplaceableItems = new GT_HashSet<>(); public static Object sBoxableWrapper = GT_Utility.callConstructor("gregtechmod.api.util.GT_IBoxableWrapper", 0, null, false); - private static Map<IRecipeInput, RecipeOutput> sExtractorRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); - private static Map<IRecipeInput, RecipeOutput> sMaceratorRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); - private static Map<IRecipeInput, RecipeOutput> sCompressorRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); - private static Map<IRecipeInput, RecipeOutput> sOreWashingRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); - private static Map<IRecipeInput, RecipeOutput> sThermalCentrifugeRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); - private static Map<IRecipeInput, RecipeOutput> sMassfabRecipes = new /*Concurrent*/HashMap<IRecipeInput, RecipeOutput>(); + private static final Map<IRecipeInput, RecipeOutput> sExtractorRecipes = new HashMap<>(); + private static final Map<IRecipeInput, RecipeOutput> sMaceratorRecipes = new HashMap<>(); + private static final Map<IRecipeInput, RecipeOutput> sCompressorRecipes = new HashMap<>(); + private static final Map<IRecipeInput, RecipeOutput> sOreWashingRecipes = new HashMap<>(); + private static final Map<IRecipeInput, RecipeOutput> sThermalCentrifugeRecipes = new HashMap<>(); + private static final Map<IRecipeInput, RecipeOutput> sMassfabRecipes = new HashMap<>(); + private static boolean sBufferCraftingRecipes = true; - public static List<Integer> sSingleNonBlockDamagableRecipeList_list = new ArrayList<Integer>(100); - private static boolean sSingleNonBlockDamagableRecipeList_create = true; + public static List<Integer> sSingleNonBlockDamagableRecipeList_list = new ArrayList<>(100); + private static final boolean sSingleNonBlockDamagableRecipeList_create = true; private static final ItemStack sMt1 = new ItemStack(Blocks.dirt, 1, 0), sMt2 = new ItemStack(Blocks.dirt, 1, 0); private static final String s_H = "h", s_F = "f", s_I = "I", s_P = "P", s_R = "R"; private static final ItemStack[][] @@ -119,12 +151,14 @@ public class GT_ModHandler { {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<Integer>(44); + public static List<Integer> sSingleNonBlockDamagableRecipeList_validsShapes1 = new ArrayList<>(44); public static boolean sSingleNonBlockDamagableRecipeList_validsShapes1_update = false; - public static List<Integer> sSingleNonBlockDamagableRecipeList_warntOutput = new ArrayList<Integer>(50); - public static List<Integer> sVanillaRecipeList_warntOutput = new ArrayList<Integer>(50); - public static final List<IRecipe> sSingleNonBlockDamagableRecipeList_verified = new ArrayList<IRecipe>(1000); - private static Cache<GT_ItemStack, ItemStack> sSmeltingRecipeCache = CacheBuilder.newBuilder().maximumSize(1000).build(); + public static List<Integer> sSingleNonBlockDamagableRecipeList_warntOutput = new ArrayList<>(50); + public static List<Integer> sVanillaRecipeList_warntOutput = new ArrayList<>(50); + public static final List<IRecipe> sSingleNonBlockDamagableRecipeList_verified = new ArrayList<>(1000); + private static final Cache<GT_ItemStack, ItemStack> sSmeltingRecipeCache = CacheBuilder.newBuilder().maximumSize(1000).build(); + public static List<Integer> sAnySteamFluidIDs = new ArrayList<>(); + public static List<Integer> sSuperHeatedSteamFluidIDs = new ArrayList<>(); static { sNativeRecipeClasses.add(ShapedRecipes.class.getName()); @@ -217,6 +251,20 @@ public class GT_ModHandler { } /** + * Returns if that Liquid is Any Steam (including other mods) + */ + public static boolean isAnySteam(FluidStack aFluid) { + return(aFluid != null && (isSteam(aFluid) || sAnySteamFluidIDs.contains(aFluid.getFluidID()))); + } + + /** + * Returns if that Liquid is Super Heated Steam (including other mods) + */ + public static boolean isSuperHeatedSteam(FluidStack aFluid) { + return(aFluid != null && sSuperHeatedSteamFluidIDs.contains(aFluid.getFluidID())); + } + + /** * Returns a Liquid Stack with given amount of Steam. */ public static FluidStack getSteam(long aAmount) { @@ -502,10 +550,8 @@ public class GT_ModHandler { public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) { aOutput = GT_OreDictUnificator.get(true, aOutput); if (aInput == null || aOutput == null) return false; - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.removeSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, true)) return false; RA.addExtractorRecipe(aInput, aOutput, 300, 2); - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.addSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null, aOutput); return true; } @@ -557,12 +603,8 @@ public class GT_ModHandler { aOutput1 = GT_OreDictUnificator.get(true, aOutput1); aOutput2 = GT_OreDictUnificator.get(true, aOutput2); if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return false; - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.removeSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null); if (GT_Utility.getContainerItem(aInput, false) == null) { - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines && GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, true)) { - GT_Utility.addSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null, aOutput1); - } addMagneticraftRecipe(aInput, aOutput1, aOutput2, aChance2, aOutput3, aChance3); addImmersiveEngineeringRecipe(aInput, aOutput1, aOutput2, aChance2, aOutput3, aChance3); RA.addPulveriserRecipe(aInput, new ItemStack[]{aOutput1, aOutput2, aOutput3}, new int[]{10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3}, 400, 2); @@ -680,39 +722,34 @@ public class GT_ModHandler { */ 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 (Iterator i$ = aIC2RecipeList.entrySet().iterator(); i$.hasNext(); ) { - Entry tRecipe = (Map.Entry) i$.next(); - if (((RecipeOutput) tRecipe.getValue()).items.size() > 0) { - for (ItemStack tStack : ((IRecipeInput) tRecipe.getKey()).getInputs()) { + for (Entry<IRecipeInput, RecipeOutput> iRecipeInputRecipeOutputEntry : aIC2RecipeList.entrySet()) { + if ((iRecipeInputRecipeOutputEntry.getValue()).items.size() > 0) { + for (ItemStack tStack : (iRecipeInputRecipeOutputEntry.getKey()).getInputs()) { if (GT_Utility.isStackValid(tStack)) { if (aAddGTRecipe && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) { - try{ - 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": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); - break; - case "gt.recipe.compressor": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); - break; - case "gt.recipe.extractor": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); - break; - case "gt.recipe.thermalcentrifuge": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 500, 48, 0); - break; + try { + if (aExcludeGTIC2Items && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") || tStack.getUnlocalizedName().contains("gt.blockores") || tStack.getUnlocalizedName().contains("ic2.itemCrushed") || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) + continue; + switch (aGTRecipeMap.mUnlocalizedName) { + case "gt.recipe.macerator": + case "gt.recipe.extractor": + case "gt.recipe.compressor": + aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount((iRecipeInputRecipeOutputEntry.getKey()).getAmount(), tStack)}, (ItemStack[]) (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); + break; + case "gt.recipe.thermalcentrifuge": + aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount((iRecipeInputRecipeOutputEntry.getKey()).getAmount(), tStack)}, (ItemStack[]) (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), null, null, null, null, 500, 48, 0); + break; + } + } catch (Exception e) { + System.err.println(e); } - }catch(Exception e){System.err.println(e);} - //GT_FML_LOGGER.info("#####Processed IC2 " + aGTRecipeMap.mUnlocalizedName + " Recipe: In(" + tStack.getUnlocalizedName() + ") - Out(" + ((RecipeOutput) tRecipe.getValue()).items.get(0).getUnlocalizedName() + ")"); } - if (aRemoveIC2Recipe) aRecipesToRemove.put(tStack, ((RecipeOutput) tRecipe.getValue()).items.get(0)); + if (aRemoveIC2Recipe) aRecipesToRemove.put(tStack, ((RecipeOutput) iRecipeInputRecipeOutputEntry.getValue()).items.get(0)); } } } } - for (Entry<ItemStack, ItemStack> aEntry : aRecipesToRemove.entrySet()) { - GT_Utility.removeSimpleIC2MachineRecipe(aEntry.getKey(), aIC2RecipeList, aEntry.getValue()); - } + GT_Utility.bulkRemoveSimpleIC2MachineRecipe(aRecipesToRemove, aIC2RecipeList); } public static Map<IRecipeInput, RecipeOutput> getExtractorRecipeList() { @@ -762,14 +799,8 @@ public class GT_ModHandler { */ public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.removeSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), null); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; RA.addThermalCentrifugeRecipe(aInput, aOutput.length >= 1 ? (ItemStack)aOutput[0] : null, aOutput.length >= 2 ? (ItemStack)aOutput[1] : null, aOutput.length >= 3 ? (ItemStack)aOutput[2] : null, 500, 48); - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) { - NBTTagCompound tNBT = new NBTTagCompound(); - tNBT.setInteger("minHeat", aHeat); - GT_Utility.addSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), tNBT, aOutput); - } return true; } @@ -778,15 +809,9 @@ public class GT_ModHandler { */ public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.removeSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), null); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(1000L), 500, 16); RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(200L), 300, 16); - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) { - NBTTagCompound tNBT = new NBTTagCompound(); - tNBT.setInteger("amount", aWaterAmount); - GT_Utility.addSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), tNBT, aOutput); - } return true; } @@ -796,10 +821,8 @@ public class GT_ModHandler { public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput) { aOutput = GT_OreDictUnificator.get(true, aOutput); if (aInput == null || aOutput == null || GT_Utility.areStacksEqual(aInput, aOutput, true)) return false; - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.removeSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, true)) return false; RA.addCompressorRecipe(aInput, aOutput, 300, 2); - if (GT_Mod.gregtechproxy.mAddGTRecipesToIC2Machines) GT_Utility.addSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null, aOutput); return true; } @@ -833,7 +856,13 @@ public class GT_ModHandler { public static void stopBufferingCraftingRecipes() { sBufferCraftingRecipes = false; - for (IRecipe tRecipe : sBufferRecipeList) {GameRegistry.addRecipe(tRecipe);} + + bulkRemoveRecipeByOutput(delayedRemovalByOutput); + bulkRemoveByRecipe(delayedRemovalByRecipe); + sBufferRecipeList.forEach(GameRegistry::addRecipe); + + delayedRemovalByOutput.clear(); + delayedRemovalByRecipe.clear(); sBufferRecipeList.clear(); } @@ -897,18 +926,54 @@ public class GT_ModHandler { * 'x' ToolDictNames.craftingToolWireCutter, */ public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { - return addCraftingRecipe(aResult, new Enchantment[0], new int[0], (aBitMask & RecipeBits.MIRRORED) != 0, (aBitMask & RecipeBits.BUFFERED) != 0, (aBitMask & RecipeBits.KEEPNBT) != 0, (aBitMask & RecipeBits.DISMANTLEABLE) != 0, (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, (aBitMask & RecipeBits.REVERSIBLE) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0, (aBitMask & RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0, (aBitMask & RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0, (aBitMask & RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0, (aBitMask & RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0, aRecipe); + return addCraftingRecipe( + aResult, + new Enchantment[0], + new int[0], + (aBitMask & RecipeBits.MIRRORED) != 0, + (aBitMask & RecipeBits.BUFFERED) != 0, + (aBitMask & RecipeBits.KEEPNBT) != 0, + (aBitMask & RecipeBits.DISMANTLEABLE) != 0, + (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, + (aBitMask & RecipeBits.REVERSIBLE) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0, + (aBitMask & RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0, + (aBitMask & RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0, + (aBitMask & RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0, + aRecipe); } /** * 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); if (aRecipe == null || aRecipe.length <= 0) return false; + boolean tDoWeCareIfThereWasARecipe = aOnlyAddIfThereIsAnyRecipeOutputtingThis; boolean tThereWasARecipe = false; for (byte i = 0; i < aRecipe.length; i++) { @@ -921,21 +986,21 @@ public class GT_ModHandler { } try { - String shape = E; + StringBuilder shape = new StringBuilder(E); int idx = 0; if (aRecipe[idx] instanceof Boolean) { throw new IllegalArgumentException(); } - ArrayList<Object> tRecipeList = new ArrayList<Object>(Arrays.asList(aRecipe)); + ArrayList<Object> tRecipeList = new ArrayList<>(Arrays.asList(aRecipe)); while (aRecipe[idx] instanceof String) { - String s = (String) aRecipe[idx++]; - shape += s; - while (s.length() < 3) s += " "; + StringBuilder s = new StringBuilder((String) aRecipe[idx++]); + shape.append(s); + while (s.length() < 3) s.append(" "); if (s.length() > 3) throw new IllegalArgumentException(); - for (char c : s.toCharArray()) { + for (char c : s.toString().toCharArray()) { switch (c) { case 'b': tRecipeList.add(c); @@ -1002,8 +1067,8 @@ public class GT_ModHandler { if (aRecipe[idx] instanceof Boolean) { idx++; } - /*ConcurrentHash*/Map<Character, ItemStack> tItemStackMap = new /*ConcurrentHash*/HashMap<Character, ItemStack>(); - /*ConcurrentHash*/Map<Character, ItemData> tItemDataMap = new /*ConcurrentHash*/HashMap<Character, ItemData>(); + Map<Character, ItemStack> tItemStackMap = new HashMap<>(); + Map<Character, ItemData> tItemDataMap = new HashMap<>(); tItemStackMap.put(' ', null); boolean tRemoveRecipe = true; @@ -1023,16 +1088,22 @@ public class GT_ModHandler { tItemDataMap.put(chr, GT_OreDictUnificator.getItemData((ItemStack) in)); } else if (in instanceof ItemData) { String tString = in.toString(); - if (tString.equals("plankWood")) { - tItemDataMap.put(chr, new ItemData(Materials.Wood, M)); - } else if (tString.equals("stoneNetherrack")) { - tItemDataMap.put(chr, new ItemData(Materials.Netherrack, M)); - } else if (tString.equals("stoneObsidian")) { - tItemDataMap.put(chr, new ItemData(Materials.Obsidian, M)); - } else if (tString.equals("stoneEndstone")) { - tItemDataMap.put(chr, new ItemData(Materials.Endstone, M)); - } else { - tItemDataMap.put(chr, (ItemData) in); + switch (tString) { + case "plankWood": + tItemDataMap.put(chr, new ItemData(Materials.Wood, M)); + break; + case "stoneNetherrack": + tItemDataMap.put(chr, new ItemData(Materials.Netherrack, M)); + break; + case "stoneObsidian": + tItemDataMap.put(chr, new ItemData(Materials.Obsidian, M)); + break; + case "stoneEndstone": + tItemDataMap.put(chr, new ItemData(Materials.Endstone, M)); + break; + default: + tItemDataMap.put(chr, (ItemData) in); + break; } ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1); if (tStack == null) tRemoveRecipe = false; @@ -1062,7 +1133,7 @@ public class GT_ModHandler { if (aReversible && aResult != null) { ItemData[] tData = new ItemData[9]; int x = -1; - for (char chr : shape.toCharArray()) tData[++x] = tItemDataMap.get(chr); + for (char chr : shape.toString().toCharArray()) tData[++x] = tItemDataMap.get(chr); if (GT_Utility.arrayContainsNonNull(tData)) GT_OreDictUnificator.addItemData(aResult, new ItemData(tData)); } @@ -1070,12 +1141,15 @@ public class GT_ModHandler { if (aCheckForCollisions && tRemoveRecipe) { ItemStack[] tRecipe = new ItemStack[9]; int x = -1; - for (char chr : shape.toCharArray()) { + for (char chr : shape.toString().toCharArray()) { tRecipe[++x] = tItemStackMap.get(chr); if (tRecipe[x] != null && Items.feather.getDamage(tRecipe[x]) == W) Items.feather.setDamage(tRecipe[x], 0); } - tThereWasARecipe = removeRecipe(tRecipe) != null || tThereWasARecipe; + if (tDoWeCareIfThereWasARecipe || !aBuffered) + tThereWasARecipe = removeRecipe(tRecipe) != null || tThereWasARecipe; + else + removeRecipeDelayed(tRecipe); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -1083,10 +1157,14 @@ public class GT_ModHandler { if (aResult == null || aResult.stackSize <= 0) return false; - if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes) - tThereWasARecipe = removeRecipeByOutput(aResult, !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, aRemoveAllOtherShapedsWithSameOutput, aRemoveAllOtherNativeRecipes) || tThereWasARecipe; - - if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tThereWasARecipe) { + if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes) { + if(tDoWeCareIfThereWasARecipe || !aBuffered) + tThereWasARecipe = removeRecipeByOutput(aResult, !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, aRemoveAllOtherShapedsWithSameOutput, aRemoveAllOtherNativeRecipes) || tThereWasARecipe; + else + removeRecipeByOutputDelayed(aResult); + } + + if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tDoWeCareIfThereWasARecipe && !tThereWasARecipe) { ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); int tList_sS=tList.size(); for (int i = 0; i < tList_sS && !tThereWasARecipe; i++) { @@ -1163,14 +1241,13 @@ public class GT_ModHandler { } else if (tObject instanceof String) { tRecipe[i] = GT_OreDictUnificator.getFirstOre(tObject, 1); if (tRecipe[i] == null) break; - }/* else if (tObject instanceof Boolean) { - // - } else { - throw new IllegalArgumentException(); - }*/ + } i++; } - removeRecipe(tRecipe); + if (sBufferCraftingRecipes && aBuffered) + removeRecipeDelayed(tRecipe); + else + removeRecipe(tRecipe); } catch (Throwable e) { e.printStackTrace(GT_Log.err); } @@ -1212,14 +1289,8 @@ public class GT_ModHandler { */ public static ItemStack removeRecipe(ItemStack... aRecipe) { if (aRecipe == null) return null; - boolean temp = false; - for (byte i = 0; i < aRecipe.length; i++) { - if (aRecipe[i] != null) { - temp = true; - break; - } - } - if (!temp) return null; + if (Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return null; + ItemStack rReturn = null; InventoryCrafting aCrafting = new InventoryCrafting(new Container() { @Override @@ -1242,6 +1313,54 @@ public class GT_ModHandler { return rReturn; } + + public static void removeRecipeDelayed(ItemStack... aRecipe) { + if (!sBufferCraftingRecipes) { + removeRecipe(aRecipe); + return; + } + + if (aRecipe == null) return; + if (Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return; + + InventoryCrafting aCrafting = new InventoryCrafting(new Container() { + @Override + public boolean canInteractWith(EntityPlayer var1) { + return false; + } + }, 3, 3); + for (int i = 0; i < aRecipe.length && i < 9; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); + delayedRemovalByRecipe.add(aCrafting); + } + + @SuppressWarnings("unchecked") + public static void bulkRemoveByRecipe(List<InventoryCrafting> toRemove) { + ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + GT_FML_LOGGER.info("BulkRemoveByRecipe: tList: " + tList.size() + " toRemove: " + toRemove.size() ); + + Set<IRecipe> tListToRemove = tList.parallelStream().filter(tRecipe -> { + if ((tRecipe instanceof IGT_CraftingRecipe) && !((IGT_CraftingRecipe) tRecipe).isRemovable()) return false; + return toRemove.stream().anyMatch(aCrafting -> tRecipe.matches(aCrafting, DW)); + }).collect(Collectors.toSet()); + + tList.removeIf(tListToRemove::contains); + } + + public static boolean removeRecipeByOutputDelayed(ItemStack aOutput) { + if (sBufferCraftingRecipes) + return delayedRemovalByOutput.add(aOutput); + else + return removeRecipeByOutput(aOutput); + } + + public static boolean removeRecipeByOutputDelayed (ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { + if (sBufferCraftingRecipes && (aIgnoreNBT && !aNotRemoveShapelessRecipes && !aOnlyRemoveNativeHandlers)) + // Too lazy to handle deferred versions of the parameters that aren't used very often + return delayedRemovalByOutput.add(aOutput); + else + return removeRecipeByOutput(aOutput, aIgnoreNBT, aNotRemoveShapelessRecipes, aOnlyRemoveNativeHandlers); + } + public static boolean removeRecipeByOutput(ItemStack aOutput) { return removeRecipeByOutput(aOutput, true, false, false); } @@ -1268,7 +1387,10 @@ public class GT_ModHandler { if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue; } ItemStack tStack = tRecipe.getRecipeOutput(); - if ((!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe) tRecipe).isRemovable()) && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) { + if ( + (!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe) tRecipe).isRemovable()) + && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT) + ) { tList.remove(i--); tList_sS=tList.size(); rReturn = true; } @@ -1276,6 +1398,24 @@ public class GT_ModHandler { return rReturn; } + public static boolean bulkRemoveRecipeByOutput(List<ItemStack> toRemove) { + ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + + 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()); + + tList.removeIf(tListToRemove::contains); + return true; + } + /** * Checks all Crafting Handlers for Recipe Output * Used for the Autocrafting Table @@ -1286,8 +1426,8 @@ public class GT_ModHandler { if (aWorld == null) aWorld = DW; boolean temp = false; - for (byte i = 0; i < aRecipe.length; i++) { - if (aRecipe[i] != null) { + for (ItemStack itemStack : aRecipe) { + if (itemStack != null) { temp = true; break; } @@ -1345,23 +1485,25 @@ public class GT_ModHandler { * Used for Recipe Detection. */ public static ItemStack getRecipeOutput(ItemStack... aRecipe) { - return getRecipeOutput(false, aRecipe); + return getRecipeOutput(false, true, aRecipe); } - + + public static ItemStack getRecipeOutputNoOreDict(ItemStack... aRecipe) { + return getRecipeOutput(false,false, aRecipe); + } + + public static ItemStack getRecipeOutput(boolean aUncopiedStack, ItemStack... aRecipe) { + return getRecipeOutput(aUncopiedStack, true, aRecipe); + } + /** * Gives you a copy of the Output from a Crafting Recipe * Used for Recipe Detection. */ - public static ItemStack getRecipeOutput(boolean aUncopiedStack, ItemStack... aRecipe) { - if (aRecipe == null) return null; - boolean temp = false; - for (byte i = 0; i < aRecipe.length; i++) { - if (aRecipe[i] != null) { - temp = true; - break; - } - } - if (!temp) return null; + @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 var1) { @@ -1370,15 +1512,19 @@ public class GT_ModHandler { }, 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(); - for (int i = 0; i < tList.size(); i++) { - temp = false; + boolean found = false; + + for (IRecipe iRecipe : tList) { + found = false; + if (!allowOreDict && iRecipe instanceof ShapedOreRecipe) continue; + try { - temp = tList.get(i).matches(aCrafting, DW); + found = iRecipe.matches(aCrafting, DW); } catch (Throwable e) { e.printStackTrace(GT_Log.err); } - if (temp) { - ItemStack tOutput = aUncopiedStack ? tList.get(i).getRecipeOutput() : tList.get(i).getCraftingResult(aCrafting); + if (found) { + 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) @@ -1595,7 +1741,7 @@ public class GT_ModHandler { for (Entry<IRecipeInput, RecipeOutput> tEntry : aRecipeList.entrySet()) { if (tEntry.getKey().matches(aInput)) { if (tEntry.getKey().getAmount() <= aInput.stackSize) { - ItemStack[] tList = tEntry.getValue().items.toArray(new ItemStack[tEntry.getValue().items.size()]); + ItemStack[] tList = tEntry.getValue().items.toArray(new ItemStack[0]); if (tList.length == 0) break; ItemStack[] rList = new ItemStack[aOutputSlots.length]; rRecipeMetaData.setTag("return", tEntry.getValue().metadata); @@ -1917,6 +2063,10 @@ public class GT_ModHandler { * Only adds the Recipe if it has an Output */ public static long ONLY_ADD_IF_RESULT_IS_NOT_NULL = B[12]; + /** + * Don't remove shapeless recipes with this output + */ + public static long DONT_REMOVE_SHAPELESS = B[13]; } /** diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java index 188af9cfaa..98809bbf45 100644 --- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java +++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java @@ -13,13 +13,17 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import javax.annotation.Nullable; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.W; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -31,10 +35,10 @@ import static gregtech.api.enums.GT_Values.*; * P.S. It is intended to be named "Unificator" and not "Unifier", because that sounds more awesome. */ public class GT_OreDictUnificator { - private static final /*ConcurrentHash*/Map<String, ItemStack> sName2StackMap = new /*ConcurrentHash*/HashMap<String, ItemStack>(); - private static final /*ConcurrentHash*/Map<GT_ItemStack, ItemData> sItemStack2DataMap = new /*ConcurrentHash*/HashMap<GT_ItemStack, ItemData>(); - private static final /*ConcurrentHash*/Map<GT_ItemStack, List<ItemStack>> sUnificationTable = new /*ConcurrentHash*/HashMap<GT_ItemStack, List<ItemStack>>(); - private static final GT_HashSet<GT_ItemStack> sNoUnificationList = new GT_HashSet<GT_ItemStack>(); + private static final Map<String, ItemStack> sName2StackMap = new HashMap<>(); + private static final Map<GT_ItemStack, ItemData> sItemStack2DataMap = new HashMap<>(); + private static final Map<GT_ItemStack, List<ItemStack>> sUnificationTable = new HashMap<>(); + private static final GT_HashSet<GT_ItemStack> sNoUnificationList = new GT_HashSet<>(); public static volatile int VERSION = 509; private static int isRegisteringOre = 0, isAddingOre = 0; private static boolean mRunThroughTheList = true; @@ -81,7 +85,7 @@ public class GT_OreDictUnificator { if (GT_Utility.isStringInvalid(aName)) return null; ItemStack tStack = sName2StackMap.get(aName.toString()); if (GT_Utility.isStackValid(tStack)) return GT_Utility.copyAmount(aAmount, tStack); - return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); + return GT_Utility.copyAmount(aAmount, getOresImmutable(aName).toArray()); } public static ItemStack get(Object aName, long aAmount) { @@ -104,9 +108,18 @@ public class GT_OreDictUnificator { public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount, boolean aMentionPossibleTypos, boolean aNoInvalidAmounts) { if (aNoInvalidAmounts && aAmount < 1) return null; - if (!sName2StackMap.containsKey(aName.toString()) && aMentionPossibleTypos) + final ItemStack stackFromName = sName2StackMap.get(aName.toString()); + if (stackFromName != null) return GT_Utility.copyAmount(aAmount, stackFromName); + if (aMentionPossibleTypos) { GT_Log.err.println("Unknown Key for Unification, Typo? " + aName); - return GT_Utility.copyAmount(aAmount, sName2StackMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement); + // Debug callstack of entries not in sName2StackMap + // StackTraceElement[] cause = Thread.currentThread().getStackTrace(); + // GT_Log.err.println(Arrays.toString(cause)); + + } + final ItemStack stackFirstOre = getFirstOre(aName, aAmount); + if (stackFirstOre != null) return GT_Utility.copyAmount(aAmount, stackFirstOre); + return GT_Utility.copyAmount(aAmount, aReplacement); } public static ItemStack[] setStackArray(boolean aUseBlackList, ItemStack... aStacks) { @@ -158,6 +171,12 @@ 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 */ + public static ItemStack get_nocopy(ItemStack aStack) { + return get_nocopy(true, aStack); + } + + /** Doesn't copy the returned stack or set quantity. Be careful and do not mutate it; + * intended only to optimize comparisons */ static ItemStack get_nocopy(boolean aUseBlackList, ItemStack aStack) { if (GT_Utility.isStackInvalid(aStack)) return null; ItemData tPrefixMaterial = getAssociation(aStack); @@ -217,10 +236,8 @@ public class GT_OreDictUnificator { ItemStack tStack1 = get(false, tStack0); if (!GT_Utility.areStacksEqual(tStack0, tStack1)) { GT_ItemStack tGTStack1 = new GT_ItemStack(tStack1); - List<ItemStack> list = sUnificationTable.get(tGTStack1); - if (list == null) - sUnificationTable.put(tGTStack1, list = new ArrayList<ItemStack>()); - if (!list.contains(tStack0)) + List<ItemStack> list = sUnificationTable.computeIfAbsent(tGTStack1, k -> new ArrayList<>()); + if (!list.contains(tStack0)) list.add(tStack0); } } @@ -233,7 +250,7 @@ public class GT_OreDictUnificator { aStacks = (ItemStack[]) obj; else if (obj instanceof List) aStacks = (ItemStack[]) ((List)obj).toArray(new ItemStack[0]); - List<ItemStack> rList = new ArrayList<ItemStack>(); + List<ItemStack> rList = new ArrayList<>(); for (ItemStack aStack : aStacks) { rList.add(aStack); List<ItemStack> tList = sUnificationTable.get(new GT_ItemStack(aStack)); @@ -309,7 +326,7 @@ public class GT_OreDictUnificator { public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) { if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false; - for (ItemStack tOreStack : getOres(aName.toString())) + for (ItemStack tOreStack : getOresImmutable(aName.toString())) if (GT_Utility.areStacksEqual(tOreStack, aStack, true)) return true; return false; } @@ -338,10 +355,8 @@ public class GT_OreDictUnificator { if (GT_Utility.isStringInvalid(tName)) return false; - ArrayList<ItemStack> tList = getOres(tName); - - for (int i = 0; i < tList.size(); i++) - if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) + for (ItemStack itemStack : getOresImmutable(tName)) + if (GT_Utility.areStacksEqual(itemStack, aStack, true)) return false; isRegisteringOre++; @@ -433,7 +448,6 @@ public class GT_OreDictUnificator { public static ItemStack getIngotOrDust(MaterialStack aMaterial) { ItemStack rStack = getIngot(aMaterial); - if(aMaterial!=null&&aMaterial.mMaterial!=null&&(aMaterial.mMaterial==Materials.Naquadah||aMaterial.mMaterial==Materials.NaquadahEnriched))rStack = getDust(aMaterial); if (rStack == null) rStack = getDust(aMaterial); return rStack; } @@ -463,8 +477,18 @@ public class GT_OreDictUnificator { */ public static ArrayList<ItemStack> getOres(Object aOreName) { String aName = aOreName == null ? E : aOreName.toString(); - ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); + ArrayList<ItemStack> rList = new ArrayList<>(); if (GT_Utility.isStringValid(aName)) rList.addAll(OreDictionary.getOres(aName)); return rList; } + + /** + * 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)) : Collections.emptyList(); + } } diff --git a/src/main/java/gregtech/api/util/GT_PlayedSound.java b/src/main/java/gregtech/api/util/GT_PlayedSound.java index 136171f7b7..82c728ff8b 100644 --- a/src/main/java/gregtech/api/util/GT_PlayedSound.java +++ b/src/main/java/gregtech/api/util/GT_PlayedSound.java @@ -25,4 +25,4 @@ public class GT_PlayedSound { public int hashCode() { return mX + mY + mZ + mSoundName.hashCode(); } -}
\ No newline at end of file +} 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 e25a0209d9..853a493f4a 100644 --- a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java +++ b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java @@ -28,4 +28,4 @@ public class GT_ProcessingArray_Manager { return mRecipeCache.get(mMetaKeyMap.get(aMeta)); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 537d92b365..aa54b55277 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -561,7 +561,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler(new HashSet<>(0), "ic.recipe.recycler", "Recycler", "ic2.recycler", RES_PATH_GUI + "basicmachines/Recycler", 1, 1, 1, 0, 1, E, 1, E, true, false); public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace(new HashSet<>(0), "mc.recipe.furnace", "Furnace", "smelting", RES_PATH_GUI + "basicmachines/E_Furnace", 1, 1, 1, 0, 1, E, 1, E, true, false); public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave(new HashSet<>(0), "gt.recipe.microwave", "Microwave", "smelting", RES_PATH_GUI + "basicmachines/E_Furnace", 1, 1, 1, 0, 1, E, 1, E, true, false); - + public static final GT_Recipe_Map sDisassemblerRecipes = new GT_Recipe_Map(new HashSet<>(250), "gt.recipe.disassembler", "Disassembler", null, RES_PATH_GUI + "basicmachines/Disassembler", 1, 9, 1, 0, 1, E, 1, E, true, false); public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Scanner", 1, 1, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map(new HashSet<>(200), "gt.recipe.rockbreaker", "Rock Breaker", null, RES_PATH_GUI + "basicmachines/RockBreaker", 1, 1, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet<>(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true); @@ -898,7 +898,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Abstract Class for general Recipe Handling of non GT Recipes */ - public static abstract class GT_Recipe_Map_NonGTRecipes extends GT_Recipe_Map { + public abstract static class GT_Recipe_Map_NonGTRecipes extends GT_Recipe_Map { public GT_Recipe_Map_NonGTRecipes(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); } @@ -1840,6 +1840,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); } + @Override public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { AtomicInteger ai = new AtomicInteger(); Optional.ofNullable(GT_OreDictUnificator.getAssociation(aOutputs[0])) diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index d10f6da434..0868ff41c8 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -260,14 +260,15 @@ public class GT_RecipeRegistrator { long tAmount = 0; for (MaterialStack tMaterial : aData.getAllMaterialStacks()) tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass(); - boolean tHide = (aData.mMaterial.mMaterial != Materials.Iron)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); + boolean tHide = (aData.mMaterial.mMaterial != Materials.Iron) && (GT_Mod.gregtechproxy.mHideRecyclingRecipes); RA.addPulveriserRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, aData.mMaterial.mMaterial==Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), 4, tHide); - 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; + } ItemStack tDust = GT_OreDictUnificator.getDust(aData.mMaterial); if (tDust != null && GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1, aStack), tDust, GT_OreDictUnificator.getDust(aData.getByProduct(0)), 100, GT_OreDictUnificator.getDust(aData.getByProduct(1)), 100, true)) { if (GregTech_API.sThaumcraftCompat != null) @@ -278,7 +279,7 @@ public class GT_RecipeRegistrator { /** * Place Materials which you want to replace in Non-GT-Recipes here (warning HUGHE impact on loading times!) */ - private final static Materials[] VANILLA_MATS = { + private static final Materials[] VANILLA_MATS = { Cobalt, Gold, Iron, 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 e51c490519..7ecabaffeb 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,7 @@ package gregtech.api.util; import gregtech.api.interfaces.internal.IGT_CraftingRecipe; -import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.ReverseShapedRecipe; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.inventory.InventoryCrafting; @@ -11,7 +11,7 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRecipe { - public final boolean mDismantleable, mRemovableByGT, mKeepingNBT; + public final boolean mRemovableByGT, mKeepingNBT; private final Enchantment[] mEnchantmentsAdded; private final int[] mEnchantmentLevelsAdded; @@ -21,7 +21,9 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec mEnchantmentLevelsAdded = aEnchantmentLevelsAdded; mRemovableByGT = aRemovableByGT; mKeepingNBT = aKeepingNBT; - mDismantleable = aDismantleAble; + if (aDismantleAble) { + new ReverseShapedRecipe(aResult, aRecipe); + } } @Override @@ -65,23 +67,6 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec if (tCharge > 0) GT_ModHandler.chargeElectricItem(rStack, tCharge, Integer.MAX_VALUE, true, false); } - // Saving Ingredients inside the Item. - if (mDismantleable) { - NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound(); - if (rNBT == null) rNBT = new NBTTagCompound(); - for (int i = 0; i < 9; i++) { - ItemStack tStack = aGrid.getStackInSlot(i); - if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { - tStack = GT_Utility.copyAmount(1, tStack); - if(GT_Utility.isStackValid(tStack)){ - GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); - tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound()));} - } - } - rNBT.setTag("GT.CraftingComponents", tNBT); - rStack.setTagCompound(rNBT); - } - // Add Enchantments for (int i = 0; i < mEnchantmentsAdded.length; i++) GT_Utility.ItemNBT.addEnchantment(rStack, mEnchantmentsAdded[i], EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + mEnchantmentLevelsAdded[i]); @@ -96,4 +81,4 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec public boolean isRemovable() { return mRemovableByGT; } -}
\ No newline at end of file +} 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 937ba0a837..2718ea3efa 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,7 @@ package gregtech.api.util; import gregtech.api.interfaces.internal.IGT_CraftingRecipe; -import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.ReverseShapelessRecipe; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.inventory.InventoryCrafting; @@ -11,7 +11,7 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.ShapelessOreRecipe; 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; @@ -21,7 +21,9 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft mEnchantmentLevelsAdded = aEnchantmentLevelsAdded; mRemovableByGT = aRemovableByGT; mKeepingNBT = aKeepingNBT; - mDismantleable = aDismantleAble; + if (aDismantleAble){ + new ReverseShapelessRecipe(aResult, aRecipe); + } } @Override @@ -66,20 +68,20 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft } // Saving Ingredients inside the Item. - if (mDismantleable) { - NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound(); - if (rNBT == null) rNBT = new NBTTagCompound(); - for (int i = 0; i < 9; i++) { - ItemStack tStack = aGrid.getStackInSlot(i); - if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { - tStack = GT_Utility.copyAmount(1, tStack); - GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); - tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound())); - } - } - rNBT.setTag("GT.CraftingComponents", tNBT); - rStack.setTagCompound(rNBT); - } +// if (mDismantleable) { +// NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound(); +// if (rNBT == null) rNBT = new NBTTagCompound(); +// for (int i = 0; i < 9; i++) { +// ItemStack tStack = aGrid.getStackInSlot(i); +// if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { +// tStack = GT_Utility.copyAmount(1, tStack); +// GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); +// tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound())); +// } +// } +// rNBT.setTag("GT.CraftingComponents", tNBT); +// rStack.setTagCompound(rNBT); +// } // Add Enchantments for (int i = 0; i < mEnchantmentsAdded.length; i++) @@ -95,4 +97,4 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft public boolean isRemovable() { return mRemovableByGT; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java index 9063b1f7c9..0e29950dbd 100644 --- a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java +++ b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java @@ -9,12 +9,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; -import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; public class GT_SpawnEventHandler { - public static volatile List<int[]> mobReps = new ArrayList(); + public static volatile List<int[]> mobReps = new CopyOnWriteArrayList<>(); public GT_SpawnEventHandler() { MinecraftForge.EVENT_BUS.register(this); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 05e0874e7a..8cbb44fe07 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1,21 +1,35 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Maps; import com.mojang.authlib.GameProfile; import cpw.mods.fml.common.FMLCommonHandler; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.Textures; +import gregtech.api.enums.ToolDictNames; import gregtech.api.events.BlockScanningEvent; +import gregtech.api.interfaces.IBlockContainer; import gregtech.api.interfaces.IDebugableBlock; import gregtech.api.interfaces.IProjectileItem; import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.*; +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.GT_CopiedBlockTexture; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.ItemData; import gregtech.api.threads.GT_Runnable_Sound; @@ -27,7 +41,11 @@ import ic2.api.recipe.RecipeOutput; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.*; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureAttribute; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -63,8 +81,13 @@ import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fluids.*; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidContainerItem; +import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.oredict.OreDictionary; import java.lang.reflect.Constructor; @@ -73,11 +96,32 @@ import java.lang.reflect.Method; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.GT_Values.DW; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.GT; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.W; import static gregtech.common.GT_Proxy.GTPOLLUTION; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; @@ -90,12 +134,12 @@ public class GT_Utility { /** * 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<FluidContainerData>(); - private static final Map<GT_ItemStack, FluidContainerData> sFilledContainerToData = new /*Concurrent*/HashMap<GT_ItemStack, FluidContainerData>(); - private static final Map<GT_ItemStack, Map<Fluid, FluidContainerData>> sEmptyContainerToFluidToData = new /*Concurrent*/HashMap<GT_ItemStack, Map<Fluid, FluidContainerData>>(); + 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<>(); 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<GT_PlayedSound, Integer>(); + 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"); @@ -109,7 +153,7 @@ public class GT_Utility { } public static int safeInt(long number){ - return number>GT_Values.V[GT_Values.V.length-1] ? safeInt(GT_Values.V[GT_Values.V.length-1],1) : number<Integer.MIN_VALUE ? Integer.MIN_VALUE : (int)number; + return number> V[V.length-1] ? safeInt(V[V.length-1],1) : number<Integer.MIN_VALUE ? Integer.MIN_VALUE : (int)number; } public static Field getPublicField(Object aObject, String aField) { @@ -250,8 +294,7 @@ public class GT_Utility { Field[] var3 = EntityLiving.class.getDeclaredFields(); int var4 = var3.length; - for (int var5 = 0; var5 < var4; ++var5) { - Field var6 = var3[var5]; + for (Field var6 : var3) { if (var6.getType() == HashMap.class) { tPotionHashmap = var6; tPotionHashmap.setAccessible(true); @@ -260,7 +303,7 @@ public class GT_Utility { } if (tPotionHashmap != null) - return ((HashMap) tPotionHashmap.get(aPlayer)).get(Integer.valueOf(aPotionIndex)) != null; + return ((HashMap) tPotionHashmap.get(aPlayer)).get(aPotionIndex) != null; } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -279,8 +322,7 @@ public class GT_Utility { Field[] var3 = EntityLiving.class.getDeclaredFields(); int var4 = var3.length; - for (int var5 = 0; var5 < var4; ++var5) { - Field var6 = var3[var5]; + for (Field var6 : var3) { if (var6.getType() == HashMap.class) { tPotionHashmap = var6; tPotionHashmap.setAccessible(true); @@ -288,7 +330,7 @@ public class GT_Utility { } } - if (tPotionHashmap != null) ((HashMap) tPotionHashmap.get(aPlayer)).remove(Integer.valueOf(aPotionIndex)); + if (tPotionHashmap != null) ((HashMap) tPotionHashmap.get(aPlayer)).remove(aPotionIndex); } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -369,9 +411,7 @@ public class GT_Utility { if (TE_CHECK && aTileEntity instanceof IItemDuct) return true; if (BC_CHECK && aTileEntity instanceof buildcraft.api.transport.IPipeTile) return ((buildcraft.api.transport.IPipeTile) aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide)); - if (GregTech_API.mTranslocator && aTileEntity instanceof codechicken.translocator.TileItemTranslocator) return true; - - return false; + return GregTech_API.mTranslocator && aTileEntity instanceof codechicken.translocator.TileItemTranslocator; } /** * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. @@ -393,16 +433,16 @@ public class GT_Utility { if (aTileEntity2 != null) { checkAvailabilities(); if (TE_CHECK && aTileEntity2 instanceof IItemDuct) { - for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); + for (int aGrabSlot : aGrabSlots) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { + if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); ItemStack rStack = ((IItemDuct) aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copy(tStack)); byte tMovedItemCount = (byte) (tStack.stackSize - (rStack == null ? 0 : rStack.stackSize)); if (tMovedItemCount >= 1/*Math.max(aMinMoveAtOnce, aMinTargetStackSize)*/) { //((cofh.api.transport.IItemConduit)aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copyAmount(tMovedItemCount, tStack), F); - aTileEntity1.decrStackSize(aGrabSlots[i], tMovedItemCount); + aTileEntity1.decrStackSize(aGrabSlot, tMovedItemCount); aTileEntity1.markDirty(); return tMovedItemCount; } @@ -413,15 +453,15 @@ public class GT_Utility { return 0; } if (BC_CHECK && aTileEntity2 instanceof buildcraft.api.transport.IPipeTile) { - for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); + for (int aGrabSlot : aGrabSlots) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { + if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); byte tMovedItemCount = (byte) ((buildcraft.api.transport.IPipeTile) aTileEntity2).injectItem(copy(tStack), false, ForgeDirection.getOrientation(aPutTo)); if (tMovedItemCount >= Math.max(aMinMoveAtOnce, aMinTargetStackSize)) { tMovedItemCount = (byte) (((buildcraft.api.transport.IPipeTile) aTileEntity2).injectItem(copyAmount(tMovedItemCount, tStack), true, ForgeDirection.getOrientation(aPutTo))); - aTileEntity1.decrStackSize(aGrabSlots[i], tMovedItemCount); + aTileEntity1.decrStackSize(aGrabSlot, tMovedItemCount); aTileEntity1.markDirty(); return tMovedItemCount; } @@ -437,15 +477,15 @@ public class GT_Utility { if (aTileEntity1 instanceof TileEntity && tDirection != ForgeDirection.UNKNOWN && tDirection.getOpposite() == ForgeDirection.getOrientation(aPutTo)) { int tX = ((TileEntity) aTileEntity1).xCoord + tDirection.offsetX, tY = ((TileEntity) aTileEntity1).yCoord + tDirection.offsetY, tZ = ((TileEntity) aTileEntity1).zCoord + tDirection.offsetZ; if (!hasBlockHitBox(((TileEntity) aTileEntity1).getWorldObj(), tX, tY, tZ) && dropItem) { - for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); + for (int aGrabSlot : aGrabSlots) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { + if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); EntityItem tEntity = new EntityItem(((TileEntity) aTileEntity1).getWorldObj(), tX + 0.5, tY + 0.5, tZ + 0.5, tStack); tEntity.motionX = tEntity.motionY = tEntity.motionZ = 0; ((TileEntity) aTileEntity1).getWorldObj().spawnEntityInWorld(tEntity); - aTileEntity1.decrStackSize(aGrabSlots[i], tStack.stackSize); + aTileEntity1.decrStackSize(aGrabSlot, tStack.stackSize); aTileEntity1.markDirty(); return (byte) tStack.stackSize; } @@ -479,11 +519,10 @@ public class GT_Utility { if (tStack3 != null) { if (tStack2 == null) { aTileEntity2.setInventorySlotContents(aPutTo, copy(tStack3)); - aTileEntity2.markDirty(); } else { tStack2.stackSize += tStack3.stackSize; - aTileEntity2.markDirty(); } + aTileEntity2.markDirty(); return (byte) tStack3.stackSize; } } @@ -537,24 +576,46 @@ public class GT_Utility { 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; - int tGrabInventorySize = aTileEntity1.getSizeInventory(); + + int[] tGrabSlots = null; + if (aTileEntity1 instanceof ISidedInventory) + tGrabSlots = ((ISidedInventory) aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom); + if (tGrabSlots == null) { + tGrabSlots = new int[aTileEntity1.getSizeInventory()]; + for (int i = 0; i < tGrabSlots.length; i++) tGrabSlots[i] = i; + } + + + + + int tGrabInventorySize = tGrabSlots.length; if (aTileEntity2 instanceof IInventory) { + int[] tPutSlots = null; + if (aTileEntity2 instanceof ISidedInventory) + tPutSlots = ((ISidedInventory) aTileEntity2).getAccessibleSlotsFromSide(aPutTo); + + if (tPutSlots == null) { + tPutSlots = new int[((IInventory) aTileEntity2).getSizeInventory()]; + for (int i = 0; i < tPutSlots.length; i++) tPutSlots[i] = i; + } + IInventory tPutInventory = (IInventory) aTileEntity2; - int tPutInventorySize = tPutInventory.getSizeInventory(); + int tPutInventorySize = tPutSlots.length; int tFirstsValidSlot = 0,tStacksMoved = 0,tTotalItemsMoved = 0; - for (int tGrabSlot = 0;tGrabSlot<tGrabInventorySize;tGrabSlot++) - { + for (int grabSlot : tGrabSlots) { //ItemStack tInventoryStack : mInventory int tMovedItems; do { - tMovedItems = 0; + int tGrabSlot = grabSlot; + tMovedItems = 0; ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlot); if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter) && - (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack))) { + (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack))) { int tStackSize = tGrabStack.stackSize; - - for (int tPutSlot = tFirstsValidSlot; tPutSlot < tPutInventorySize; tPutSlot++) { + + for (int tPutSlotIndex = tFirstsValidSlot; tPutSlotIndex < tPutInventorySize; tPutSlotIndex++) { + int tPutSlot = tPutSlots[tPutSlotIndex]; if (isAllowedToPutIntoSlot(tPutInventory, tPutSlot, aPutTo, tGrabStack, (byte) 64)) { int tMoved = moveStackFromSlotAToSlotB(aTileEntity1, tPutInventory, tGrabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItems), aMinMoveAtOnce); tTotalItemsMoved += tMoved; @@ -568,7 +629,7 @@ public class GT_Utility { return tTotalItemsMoved; } } - } while (tGrabInventorySize == 2 && tMovedItems > 0); //to suport draweres and barrels + } while (tMovedItems > 0); //suport inventorys thgat store motre then a stack in a aslot } if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) { TileEntityChest tTileEntity1 = (TileEntityChest) aTileEntity1; @@ -609,10 +670,6 @@ public class GT_Utility { } //there should be a function to transfer more then 1 stack in a pipe //ut i dont see any ways to improve it too much work for what it is worth - int[] tGrabSlots = new int[tGrabInventorySize]; - for (int i = 0; i < tGrabInventorySize; i++) { - tGrabSlots[i] = i; - } int tTotalItemsMoved = 0; for (int i = 0; i < tGrabInventorySize; i++) { int tMoved = moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests); @@ -661,21 +718,21 @@ public class GT_Utility { for (int i = 0; i < tPutSlots.length; i++) tPutSlots[i] = i; } - for (int i = 0; i < tGrabSlots.length; i++) { - byte tMovedItemCount = 0; - ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlots[i]); + for (int tGrabSlot : tGrabSlots) { + byte tMovedItemCount = 0; + ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlot); if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter)) { - if (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, tGrabStack)) { - for (int j = 0; j < tPutSlots.length; j++) { - if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, tGrabStack, aMaxTargetStackSize)) { - tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce); - if (tMovedItemCount >= aMaxMoveAtOnce ||(tMovedItemCount > 0 && aMaxTargetStackSize < 64)) - return tMovedItemCount; + if (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack)) { + for (int tPutSlot : tPutSlots) { + if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlot, aPutTo, tGrabStack, aMaxTargetStackSize)) { + tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce); + if (tMovedItemCount >= aMaxMoveAtOnce || (tMovedItemCount > 0 && aMaxTargetStackSize < 64)) + return tMovedItemCount; } } } } - if (tMovedItemCount > 0) return tMovedItemCount; + if (tMovedItemCount > 0) return tMovedItemCount; } if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) { @@ -733,11 +790,11 @@ public class GT_Utility { } if (aTileEntity2 instanceof IInventory) { - for (int i = 0; i < tGrabSlots.length; i++) { - if (listContainsItem(aFilter, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot((IInventory) aTileEntity1, tGrabSlots[i], aGrabFrom, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlots[i]))) { - if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, aPutTo, (byte) 6, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) { - byte tMovedItemCount = moveStackFromSlotAToSlotB((IInventory) aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); + for (int tGrabSlot : tGrabSlots) { + if (listContainsItem(aFilter, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), true, aInvertFilter)) { + if (isAllowedToTakeFromSlot((IInventory) aTileEntity1, tGrabSlot, aGrabFrom, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot))) { + if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, aPutTo, (byte) 6, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), aMaxTargetStackSize)) { + byte tMovedItemCount = moveStackFromSlotAToSlotB((IInventory) aTileEntity1, (IInventory) aTileEntity2, tGrabSlot, aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); if (tMovedItemCount > 0) return tMovedItemCount; } } @@ -829,13 +886,16 @@ public class GT_Utility { 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; - while (aList.contains(null)) aList.remove(null); - if (aList.size() < 1) return aTIfListEmpty; - Iterator<ItemStack> tIterator = aList.iterator(); - ItemStack tStack = null; - while (tIterator.hasNext()) - if ((tStack = tIterator.next()) != null && areStacksEqual(aStack, tStack)) return !aInvertFilter; - return aInvertFilter; + boolean tEmpty = true; + for (ItemStack tStack : aList) { + if (tStack != null) { + tEmpty = false; + if (areStacksEqual(aStack, tStack)) { + return !aInvertFilter; + } + } + } + return tEmpty ? aTIfListEmpty : aInvertFilter; } public static boolean areStacksOrToolsEqual(ItemStack aStack1, ItemStack aStack2) { @@ -859,7 +919,9 @@ public class GT_Utility { } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { - return aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem() && (aIgnoreNBT || ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound()))) && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W); + return aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem() + && (aIgnoreNBT || (((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) + && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W); } public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2) { @@ -890,7 +952,7 @@ public class GT_Utility { sFilledContainerToData.put(new GT_ItemStack(tData.filledContainer), tData); Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(tData.emptyContainer)); if (tFluidToContainer == null) { - sEmptyContainerToFluidToData.put(new GT_ItemStack(tData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<Fluid, FluidContainerData>()); + sEmptyContainerToFluidToData.put(new GT_ItemStack(tData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<>()); GregTech_API.sFluidMappings.add(tFluidToContainer); } tFluidToContainer.put(tData.fluid.getFluid(), tData); @@ -902,7 +964,7 @@ public class GT_Utility { sFilledContainerToData.put(new GT_ItemStack(aData.filledContainer), aData); Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aData.emptyContainer)); if (tFluidToContainer == null) { - sEmptyContainerToFluidToData.put(new GT_ItemStack(aData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<Fluid, FluidContainerData>()); + sEmptyContainerToFluidToData.put(new GT_ItemStack(aData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<>()); GregTech_API.sFluidMappings.add(tFluidToContainer); } tFluidToContainer.put(aData.fluid.getFluid(), aData); @@ -953,12 +1015,21 @@ public class GT_Utility { return rStack; } + public static FluidStack getFluidFromDisplayStack(ItemStack aDisplayStack) { + if (!isStackValid(aDisplayStack) || + aDisplayStack.getItem() != ItemList.Display_Fluid.getItem() || + !aDisplayStack.hasTagCompound()) + return null; + Fluid tFluid = FluidRegistry.getFluid(ItemList.Display_Fluid.getItem().getDamage(aDisplayStack)); + return new FluidStack(tFluid, (int) aDisplayStack.getTagCompound().getLong("mFluidDisplayAmount")); + } + public static boolean containsFluid(ItemStack aStack, FluidStack aFluid, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack) || aFluid == null) return false; if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) return aFluid.isFluidEqual(((IFluidContainerItem) aStack.getItem()).getFluid(aStack = copyAmount(1, aStack))); FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); - return tData == null ? false : tData.fluid.isFluidEqual(aFluid); + return tData != null && tData.fluid.isFluidEqual(aFluid); } public static FluidStack getFluidForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) { @@ -1003,7 +1074,7 @@ public class GT_Utility { return copyMetaData(Items.feather.getDamage(aStack) + 1, aStack); return null; } - + public static synchronized boolean removeIC2BottleRecipe(ItemStack aContainer, ItemStack aInput, Map<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> aRecipeList, ItemStack aOutput){ if ((isStackInvalid(aInput) && isStackInvalid(aOutput) && isStackInvalid(aContainer)) || aRecipeList == null) return false; boolean rReturn = false; @@ -1044,17 +1115,33 @@ public class GT_Utility { return rReturn; } + 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); + + 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; + + 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) { if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return false; ItemData tOreName = GT_OreDictUnificator.getAssociation(aInput); - for (int i = 0; i < aOutput.length; i++) { - if (aOutput[i] == null) { + for (Object o : aOutput) { + if (o == null) { GT_FML_LOGGER.info("EmptyIC2Output!" + aInput.getUnlocalizedName()); return false; } } ItemStack[] tStack = GT_OreDictUnificator.getStackArray(true, aOutput); - if(tStack==null||(tStack.length>0&>_Utility.areStacksEqual(aInput, tStack[0])))return false; + if(tStack==null||(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)); @@ -1183,15 +1270,15 @@ public class GT_Utility { } public static <T> ArrayList<T> getArrayListWithoutNulls(T... aArray) { - if (aArray == null) return new ArrayList<T>(); - ArrayList<T> rList = new ArrayList<T>(Arrays.asList(aArray)); + if (aArray == null) return new ArrayList<>(); + ArrayList<T> rList = new ArrayList<>(Arrays.asList(aArray)); for (int i = 0; i < rList.size(); i++) if (rList.get(i) == null) rList.remove(i--); return rList; } public static <T> ArrayList<T> getArrayListWithoutTrailingNulls(T... aArray) { - if (aArray == null) return new ArrayList<T>(); - ArrayList<T> rList = new ArrayList<T>(Arrays.asList(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--); return rList; } @@ -1352,24 +1439,24 @@ 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){ + public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { for (int page = 0; page < Textures.BlockIcons.casingTexturePages.length; page++) { ITexture[] casingTexturePage = Textures.BlockIcons.casingTexturePages[page]; - if(casingTexturePage!=null){ + if (casingTexturePage != null) { for (int index = 0; index < casingTexturePage.length; index++) { ITexture iTexture = casingTexturePage[index]; - if(iTexture instanceof GT_CopiedBlockTexture){ - Block block = ((GT_CopiedBlockTexture) iTexture).getBlock(); - byte meta = ((GT_CopiedBlockTexture) iTexture).getMeta(); - if(meta==metaFromBlock && blockFromBlock==block){ - return (page<<7)+index; + if (iTexture instanceof IBlockContainer) { + Block block = ((IBlockContainer) iTexture).getBlock(); + byte meta = ((IBlockContainer) iTexture).getMeta(); + if (meta == metaFromBlock && blockFromBlock == block) { + return (page << 7) + index; } } } } } - 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); } /** @@ -1662,8 +1749,7 @@ public class GT_Utility { * re-maps all Keys of a Map after the Keys were weakened. */ public static <X, Y> Map<X, Y> reMap(Map<X, Y> aMap) { - Map<X, Y> tMap = new /*Concurrent*/HashMap<X, Y>(); - tMap.putAll(aMap); + Map<X, Y> tMap = new HashMap<>(aMap); aMap.clear(); aMap.putAll(tMap); return aMap; @@ -1673,14 +1759,9 @@ public class GT_Utility { * Why the fuck do neither Java nor Guava have a Function to do this? */ public static <X, Y extends Comparable> LinkedHashMap<X, Y> sortMapByValuesAcending(Map<X, Y> aMap) { - List<Map.Entry<X, Y>> tEntrySet = new LinkedList<Map.Entry<X, Y>>(aMap.entrySet()); - Collections.sort(tEntrySet, new Comparator<Map.Entry<X, Y>>() { - @Override - public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) { - return aValue1.getValue().compareTo(aValue2.getValue()); - } - }); - LinkedHashMap<X, Y> rMap = new LinkedHashMap<X, Y>(); + List<Map.Entry<X, Y>> tEntrySet = new LinkedList<>(aMap.entrySet()); + tEntrySet.sort(Entry.comparingByValue()); + LinkedHashMap<X, Y> rMap = new LinkedHashMap<>(); for (Map.Entry<X, Y> tEntry : tEntrySet) rMap.put(tEntry.getKey(), tEntry.getValue()); return rMap; } @@ -1689,14 +1770,11 @@ public class GT_Utility { * Why the fuck do neither Java nor Guava have a Function to do this? */ public static <X, Y extends Comparable> LinkedHashMap<X, Y> sortMapByValuesDescending(Map<X, Y> aMap) { - List<Map.Entry<X, Y>> tEntrySet = new LinkedList<Map.Entry<X, Y>>(aMap.entrySet()); - Collections.sort(tEntrySet, new Comparator<Map.Entry<X, Y>>() { - @Override - public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) { - return aValue2.getValue().compareTo(aValue1.getValue());//FB: RV - RV_NEGATING_RESULT_OF_COMPARETO - } + List<Map.Entry<X, Y>> tEntrySet = new LinkedList<>(aMap.entrySet()); + tEntrySet.sort((aValue1, aValue2) -> { + return aValue2.getValue().compareTo(aValue1.getValue());//FB: RV - RV_NEGATING_RESULT_OF_COMPARETO }); - LinkedHashMap<X, Y> rMap = new LinkedHashMap<X, Y>(); + LinkedHashMap<X, Y> rMap = new LinkedHashMap<>(); for (Map.Entry<X, Y> tEntry : tEntrySet) rMap.put(tEntry.getKey(), tEntry.getValue()); return rMap; } @@ -1723,7 +1801,7 @@ public class GT_Utility { if(aDimensionID<=1 && aDimensionID>=-1 && !GregTech_API.sDimensionalList.contains(aDimensionID)) return true; return !GregTech_API.sDimensionalList.contains(aDimensionID) && DimensionManager.isDimensionRegistered(aDimensionID); } - + //public static boolean isRealDimension(int aDimensionID) { // try { // if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("com.xcompwiz.mystcraft")) @@ -1737,7 +1815,7 @@ public class GT_Utility { // } catch (Throwable e) {/*Do nothing*/} // return GregTech_API.sDimensionalList.contains(aDimensionID); //} - + public static boolean moveEntityToDimensionAtCoords(Entity entity, int aDimension, double aX, double aY, double aZ) { //Credit goes to BrandonCore Author :!: @@ -1836,7 +1914,7 @@ public class GT_Utility { 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<String>(); + ArrayList<String> tList = new ArrayList<>(); int rEUAmount = 0; TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); @@ -1861,7 +1939,7 @@ public class GT_Utility { rEUAmount += 500; FluidTankInfo[] tTanks = ((IFluidHandler) tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide)); if (tTanks != null) for (byte i = 0; i < tTanks.length; i++) { - tList.add(trans("167","Tank ") + i + ": " +EnumChatFormatting.GREEN+ GT_Utility.formatNumbers((tTanks[i].fluid == null ? 0 : tTanks[i].fluid.amount)) +EnumChatFormatting.RESET+ " L / " +EnumChatFormatting.YELLOW+ GT_Utility.formatNumbers(tTanks[i].capacity) +EnumChatFormatting.RESET+ " L " +EnumChatFormatting.GOLD+ getFluidName(tTanks[i].fluid, true)+EnumChatFormatting.RESET); + tList.add(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) { @@ -1946,10 +2024,16 @@ public class GT_Utility { } try { if (tTileEntity instanceof IMachineProgress) { + if (((IMachineProgress) tTileEntity).isAllowedToWork()) { + tList.add("Disabled." + EnumChatFormatting.RED + EnumChatFormatting.RESET); + } + if (((IMachineProgress) tTileEntity).wasShutdown()) { + tList.add("Shut down due to power loss." + EnumChatFormatting.RED + EnumChatFormatting.RESET); + } rEUAmount += 400; int tValue = 0; if (0 < (tValue = ((IMachineProgress) tTileEntity).getMaxProgress())) - tList.add(trans("178","Progress/Load: ") +EnumChatFormatting.GREEN+GT_Utility.formatNumbers(((IMachineProgress) tTileEntity).getProgress()) +EnumChatFormatting.RESET+ " / " +EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(tValue) +EnumChatFormatting.RESET); + tList.add(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); @@ -1965,9 +2049,9 @@ public class GT_Utility { } try { if (tTileEntity instanceof IBasicEnergyContainer && ((IBasicEnergyContainer) tTileEntity).getEUCapacity() > 0) { - tList.add(trans("179","Max IN: ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(((IBasicEnergyContainer) tTileEntity).getInputVoltage())] + ") " +EnumChatFormatting.RESET+ trans("182"," EU at ") +EnumChatFormatting.RED+((IBasicEnergyContainer)tTileEntity).getInputAmperage()+EnumChatFormatting.RESET+trans("183"," A")); - tList.add(trans("181","Max OUT: ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(((IBasicEnergyContainer) tTileEntity).getOutputVoltage())] + ") " +EnumChatFormatting.RESET+ trans("182"," EU at ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputAmperage() +EnumChatFormatting.RESET+ trans("183"," A")); - tList.add(trans("184","Energy: ") +EnumChatFormatting.GREEN+ GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getStoredEU()) +EnumChatFormatting.RESET+ " EU / " +EnumChatFormatting.YELLOW+ GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getEUCapacity()) +EnumChatFormatting.RESET+ " EU"); + tList.add(trans("179","Max IN: ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getInputVoltage() + " (" + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getInputVoltage())] + ") " +EnumChatFormatting.RESET+ trans("182"," EU at ") +EnumChatFormatting.RED+((IBasicEnergyContainer)tTileEntity).getInputAmperage()+EnumChatFormatting.RESET+trans("183"," A")); + tList.add(trans("181","Max OUT: ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputVoltage() + " (" + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getOutputVoltage())] + ") " +EnumChatFormatting.RESET+ trans("182"," EU at ") +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputAmperage() +EnumChatFormatting.RESET+ trans("183"," A")); + tList.add(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); @@ -1988,40 +2072,41 @@ public class GT_Utility { } try { if (tTileEntity instanceof ic2.api.crops.ICropTile) { - if (((ic2.api.crops.ICropTile) tTileEntity).getScanLevel() < 4) { - rEUAmount += 10000; - ((ic2.api.crops.ICropTile) tTileEntity).setScanLevel((byte) 4); - } - if (((ic2.api.crops.ICropTile) tTileEntity).getID() >= 0 && ((ic2.api.crops.ICropTile) tTileEntity).getID() < ic2.api.crops.Crops.instance.getCropList().length && ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()] != null) { - rEUAmount += 1000; - tList.add(trans("187","Type -- Crop-Name: ") + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].name() - + trans("188"," Growth: ") + ((ic2.api.crops.ICropTile) tTileEntity).getGrowth() - + trans("189"," Gain: ") + ((ic2.api.crops.ICropTile) tTileEntity).getGain() - + trans("190"," Resistance: ") + ((ic2.api.crops.ICropTile) tTileEntity).getResistance() - ); - tList.add(trans("191","Plant -- Fertilizer: ") + ((ic2.api.crops.ICropTile) tTileEntity).getNutrientStorage() - + trans("192"," Water: ") + ((ic2.api.crops.ICropTile) tTileEntity).getHydrationStorage() - + trans("193"," Weed-Ex: ") + ((ic2.api.crops.ICropTile) tTileEntity).getWeedExStorage() - + trans("194"," Scan-Level: ") + ((ic2.api.crops.ICropTile) tTileEntity).getScanLevel() - ); - tList.add(trans("195","Environment -- Nutrients: ") + ((ic2.api.crops.ICropTile) tTileEntity).getNutrients() - + trans("196"," Humidity: ") + ((ic2.api.crops.ICropTile) tTileEntity).getHumidity() - + trans("197"," Air-Quality: ") + ((ic2.api.crops.ICropTile) tTileEntity).getAirQuality() + rEUAmount += 1000; + ic2.api.crops.ICropTile crop = (ic2.api.crops.ICropTile) tTileEntity; + if (crop.getScanLevel() < 4) + crop.setScanLevel((byte) 4); + if (crop.getCrop() != null) { + tList.add(trans("187", "Type -- Crop-Name: ") + crop.getCrop().name() + + trans("188", " Growth: ") + crop.getGrowth() + + trans("189", " Gain: ") + crop.getGain() + + trans("190", " Resistance: ") + crop.getResistance() ); + } + tList.add(trans("191","Plant -- Fertilizer: ") + crop.getNutrientStorage() + + trans("192"," Water: ") + crop.getHydrationStorage() + + trans("193"," Weed-Ex: ") + crop.getWeedExStorage() + + trans("194"," Scan-Level: ") + crop.getScanLevel() + ); + tList.add(trans("195","Environment -- Nutrients: ") + crop.getNutrients() + + trans("196"," Humidity: ") + crop.getHumidity() + + trans("197"," Air-Quality: ") + crop.getAirQuality() + ); + if (crop.getCrop() != null) { StringBuilder tStringB = new StringBuilder(); - for (String tAttribute : ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].attributes()) { + for (String tAttribute : crop.getCrop().attributes()) { tStringB.append(", ").append(tAttribute); } String tString = tStringB.toString(); tList.add(trans("198","Attributes:") + tString.replaceFirst(",", E)); - tList.add(trans("199","Discovered by: ") + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].discoveredBy()); + tList.add(trans("199","Discovered by: ") + crop.getCrop().discoveredBy()); } } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } } - + if (aPlayer.capabilities.isCreativeMode) { FluidStack tFluid = undergroundOilReadInformation(aWorld.getChunkFromBlockCoords(aX,aZ));//-# to only read if (tFluid!=null) @@ -2176,16 +2261,10 @@ public class GT_Utility { public static ArrayList<String> sortByValueToList( Map<String, Integer> map ) { List<Map.Entry<String, Integer>> list = - new LinkedList<Map.Entry<String, Integer>>( map.entrySet() ); - Collections.sort( list, new Comparator<Map.Entry<String, Integer>>() - { - public int compare( Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2 ) - { - return o2.getValue() - o1.getValue(); - } - } ); + new LinkedList<>(map.entrySet()); + list.sort((o1, o2) -> o2.getValue() - o1.getValue()); - ArrayList<String> result = new ArrayList<String>(); + ArrayList<String> result = new ArrayList<>(); for (Map.Entry<String, Integer> e : list) result.add(e.getKey()); return result; @@ -2199,7 +2278,7 @@ public class GT_Utility { } public static ItemStack getIntegratedCircuit(int config){ - return ItemList.Circuit_Integrated.getWithDamage(0, config, new Object[0]); + return ItemList.Circuit_Integrated.getWithDamage(0, config); } public static float getBlockHardnessAt(World aWorld, int aX, int aY, int aZ) { @@ -2242,7 +2321,7 @@ public class GT_Utility { aStack.setTagCompound(null); return; } - ArrayList<String> tTagsToRemove = new ArrayList<String>(); + ArrayList<String> tTagsToRemove = new ArrayList<>(); for (Object tKey : aNBT.func_150296_c()) { NBTBase tValue = aNBT.getTag((String) tKey); if (tValue == null || (tValue instanceof NBTPrimitive && ((NBTPrimitive) tValue).func_150291_c() == 0) || (tValue instanceof NBTTagString && isStringInvalid(((NBTTagString) tValue).func_150285_a_()))) @@ -2315,13 +2394,13 @@ public class GT_Utility { public static void setProspectionData(ItemStack aStack, int aX, int aY, int aZ, int aDim, FluidStack aFluid, String... aOres) { NBTTagCompound tNBT = getNBT(aStack); - String tData = aX + "," + aY + "," + aZ + "," + aDim + ","; + StringBuilder tData = new StringBuilder(aX + "," + aY + "," + aZ + "," + aDim + ","); if (aFluid!=null) - tData += (aFluid.amount) + "," + aFluid.getLocalizedName() + ",";//TODO CHECK IF THAT /5000 is needed (Not needed) + tData.append(aFluid.amount).append(",").append(aFluid.getLocalizedName()).append(",");//TODO CHECK IF THAT /5000 is needed (Not needed) for (String tString : aOres) { - tData += tString + ","; + tData.append(tString).append(","); } - tNBT.setString("prospection", tData); + tNBT.setString("prospection", tData.toString()); setNBT(aStack, tNBT); } @@ -2335,8 +2414,8 @@ public class GT_Utility { setBookTitle(aStack, "Raw Prospection Data"); - NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); - + NBTTagCompound tNBT = getNBT(aStack); + tNBT.setByte("prospection_tier", aTier); tNBT.setString("prospection_pos", "Dim: " + aDim + "\nX: " + aX + " Y: " + aY + " Z: " + aZ); @@ -2345,32 +2424,32 @@ public class GT_Utility { tNBT.setString("prospection_ores", joinListToString(aOres)); // oils - ArrayList<String> tOilsTransformed = new ArrayList<String>(aOils.size()); + ArrayList<String> tOilsTransformed = new ArrayList<>(aOils.size()); for (String aStr : aOils) { String[] aStats = aStr.split(","); tOilsTransformed.add(aStats[0] + ": " + aStats[1] + "L " + aStats[2]); } - + tNBT.setString("prospection_oils", joinListToString(tOilsTransformed)); String tOilsPosStr = "X: " + Math.floorDiv(aX, 16*8)*16*8 + " Z: " + Math.floorDiv(aZ, 16*8)*16*8 + "\n"; int xOff = aX - Math.floorDiv(aX, 16*8)*16*8; xOff = xOff/16; int xOffRemain = 7 - xOff; - + int zOff = aZ - Math.floorDiv(aZ, 16*8)*16*8; zOff = zOff/16; int zOffRemain = 7 - zOff; - + for( ; zOff > 0; zOff-- ) { tOilsPosStr = tOilsPosStr.concat("--------\n"); } for( ; xOff > 0; xOff-- ) { tOilsPosStr = tOilsPosStr.concat("-"); } - + tOilsPosStr = tOilsPosStr.concat("P"); - + for( ; xOffRemain > 0; xOffRemain-- ) { tOilsPosStr = tOilsPosStr.concat("-"); } @@ -2397,14 +2476,13 @@ public class GT_Utility { if (tDataArray.length > 6) { tNBT.setString("author", " Dim: " + tDataArray[3] + "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + tDataArray[2]); NBTTagList tNBTList = new NBTTagList(); - String tOres = " Prospected Ores: "; + StringBuilder tOres = new StringBuilder(" Prospected Ores: "); for (int i = 6; tDataArray.length > i; i++) { - tOres += (tDataArray[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)); tNBT.setTag("pages", tNBTList); } - setNBT(aStack, tNBT); } else { // advanced prospection data String tPos = tNBT.getString("prospection_pos"); String tRadius = tNBT.getString("prospection_radius"); @@ -2425,11 +2503,11 @@ public class GT_Utility { + "Location is center of orevein\n\n" + "Check NEI to confirm orevein type"; tNBTList.appendTag(new NBTTagString(tPageText)); - + if (tOres != null) fillBookWithList(tNBTList, "Ores Found %s\n\n", "\n", 7, tOres); - + if (tOils != null) fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); @@ -2447,31 +2525,31 @@ public class GT_Utility { tOilsPosStr + "\n" + "P - Prospector in 8x8 field"; tNBTList.appendTag(new NBTTagString(tPageText)); - + tNBT.setString("author", tPos.replace("\n"," ")); tNBT.setTag("pages", tNBTList); - setNBT(aStack, tNBT); } + setNBT(aStack, tNBT); } 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; - String tPageText; + StringBuilder tPageText; do { - tPageText = ""; + tPageText = new StringBuilder(); for (int i = tPage*aItemsPerPage; i < (tPage+1)*aItemsPerPage && i < list.length; i += 1) - tPageText += (tPageText.isEmpty() ? "" : aListDelimiter) + list[i]; + tPageText.append((tPageText.length() == 0) ? "" : aListDelimiter).append(list[i]); - if (!tPageText.isEmpty()) { + if (tPageText.length() > 0) { String tPageCounter = tTotalPages > 1 ? String.format(aPageFormatter, tPage + 1, tTotalPages) : ""; NBTTagString tPageTag = new NBTTagString(String.format(aPageHeader, tPageCounter) + tPageText); aBook.appendTag(tPageTag); } ++tPage; - } while (!tPageText.isEmpty()); + } while (tPageText.length() > 0); } public static void addEnchantment(ItemStack aStack, Enchantment aEnchantment, int aLevel) { @@ -2587,12 +2665,23 @@ 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) : false; + return GT_OreDictUnificator.getAssociation(aStack) != null && GT_OreDictUnificator.getAssociation(aStack).mMaterial.mMaterial.equals(aMaterials); } public static boolean isPartOfOrePrefix(ItemStack aStack, OrePrefixes aPrefix){ - return GT_OreDictUnificator.getAssociation(aStack) != null ? GT_OreDictUnificator.getAssociation(aStack).mPrefix.equals(aPrefix) : false; + return GT_OreDictUnificator.getAssociation(aStack) != null && GT_OreDictUnificator.getAssociation(aStack).mPrefix.equals(aPrefix); } + + public static final ImmutableSet<String> ORE_BLOCK_CLASSES = ImmutableSet.of( + "com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Ores", + "com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_SmallOres", + "gtPlusPlus.core.block.base.BlockBaseOre" + ); + + public static boolean isOre(Block aBlock, int aMeta) { + return isOre(new ItemStack(aBlock, 1, aMeta)) || ORE_BLOCK_CLASSES.contains(aBlock.getClass().getName()); + } + public static boolean isOre(ItemStack aStack) { for (int id: OreDictionary.getOreIDs(aStack)) { if (OreDictionary.getOreName(id).startsWith("ore")) @@ -2601,4 +2690,169 @@ public class GT_Utility { return false; } + public static Optional<GT_Recipe> reverseShapelessRecipe(ItemStack output, Object... aRecipe) { + if (output == null) { + return Optional.empty(); + } + + List<ItemStack> inputs = new ArrayList<>(); + + for (Object o : aRecipe) { + if (o instanceof ItemStack) { + ItemStack toAdd = ((ItemStack) o).copy(); + inputs.add(toAdd); + } else if (o instanceof String) { + ItemStack stack = GT_OreDictUnificator.get(o, 1); + if (stack == null) { + Optional<ItemStack> oStack = OreDictionary.getOres((String) o) + .stream() + .findAny(); + if (oStack.isPresent()) { + ItemStack copy = oStack.get().copy(); + inputs.add(copy); + } + } else { + ItemStack copy = stack.copy(); + inputs.add(copy); + } + } else if (o instanceof Item) + inputs.add(new ItemStack((Item) o)); + else if (o instanceof Block) + inputs.add(new ItemStack((Block) o)); + else + throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); + } + + 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 + ) + ); + } + + + public static Optional<GT_Recipe> reverseShapedRecipe(ItemStack output, Object... aRecipe) { + if (output == null) { +// System.out.println("Null Recipe detected!"); + return Optional.empty(); + } +// System.out.println("Registering Reverse Recipe for: " + GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(output) + "|" + output.getUnlocalizedName())); +// for (Object o : aRecipe) { +// String toPrint; +// if (o instanceof String) { +// toPrint = (String) o; +// toPrint += " String"; +// } else if (o instanceof ItemStack) { +// toPrint = GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName((ItemStack) o)); +// toPrint += " ItemStack"; +// } else if (o instanceof List) { +// toPrint = String.join(", ", ((List<String>) o)); +// toPrint += " List<String>"; +// } else if (o instanceof Item) { +// toPrint = GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(new ItemStack((Item) o))); +// toPrint += " Item"; +// } else if (o instanceof Block) { +// toPrint = GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(new ItemStack((Block) o))); +// toPrint += " Block"; +// } else if (o != null) { +// toPrint = o.toString(); +// toPrint += " Other"; +// } else { +// toPrint = "NULL"; +// } +// System.out.println(toPrint); +// } + Map<Object, Integer> recipeAsMap = new HashMap<>(); + Map<Character, Object> ingridients = new HashMap<>(); + Map<Character, Integer> amounts = new HashMap<>(); + boolean startFound = false; + for (int i = 0, aRecipeLength = aRecipe.length; i < aRecipeLength; i++) { + Object o = aRecipe[i]; + if (!startFound) { + if (o instanceof String) { + for (Character c : ((String) o).toCharArray()) + amounts.merge(c, 1, (a, b) -> ++a); + } else if (o instanceof Character) + startFound = true; + } else if (!(o instanceof Character)) + ingridients.put((Character) aRecipe[i - 1], o); + } + for (Map.Entry<Character, Object> characterObjectEntry : ingridients.entrySet()) { + for (Map.Entry<Character, Integer> characterIntegerEntry : amounts.entrySet()) { + if (characterObjectEntry.getKey() != characterIntegerEntry.getKey()) + continue; + recipeAsMap.put(characterObjectEntry.getValue(), characterIntegerEntry.getValue()); + } + } + List<ItemStack> inputs = new ArrayList<>(); + + for (Map.Entry<Object, Integer> o : recipeAsMap.entrySet()) { + final int amount = o.getValue(); + if (o.getKey() instanceof ItemStack) { + ItemStack toAdd = ((ItemStack) o.getKey()).copy(); + toAdd.stackSize = amount; + inputs.add(toAdd); + } else if (o.getKey() instanceof String) { +// System.out.println("Found OreDictEntry: "+o.getKey()); + final String dictName = (String) o.getKey(); + // Do not register tools dictName in inputs + 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(); + if (oStack.isPresent()) { + ItemStack copy = oStack.get().copy(); + copy.stackSize = amount; + inputs.add(copy); + } +// else +// System.out.println("OreDict Entry "+o.getKey()+" couldn't be found!"); + } else { + ItemStack copy = stack.copy(); + copy.stackSize = amount; + inputs.add(copy); + } + } else if (o.getKey() instanceof Item) + inputs.add(new ItemStack((Item) o.getKey(), amount)); + else if (o.getKey() instanceof Block) + inputs.add(new ItemStack((Block) o.getKey(), amount)); + else + throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); + } + + // 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 + ) + ); + } + + /** + * 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; + if (!aPlayer.inventory.addItemStackToInventory(aStack) && !aPlayer.worldObj.isRemote) { + EntityItem dropItem = aPlayer.entityDropItem(aStack, 0); + dropItem.delayBeforeCanPickup = 0; + } + } } diff --git a/src/main/java/gregtech/api/util/LightingHelper.java b/src/main/java/gregtech/api/util/LightingHelper.java new file mode 100644 index 0000000000..598253b7d7 --- /dev/null +++ b/src/main/java/gregtech/api/util/LightingHelper.java @@ -0,0 +1,728 @@ +/* + * 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; + +@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}; + private final RenderBlocks renderBlocks; + /** + * Brightness for side. + */ + private int brightness; + /** + * Ambient occlusion values for all four corners of side. + */ + private float aoTopLeft, aoBottomLeft, aoBottomRight, aoTopRight; + private boolean hasLightnessOverride; + private float lightnessOverride; + private boolean hasBrightnessOverride; + private int brightnessOverride; + private boolean hasColorOverride; + private int colorOverride = 0xffffff; + + /** + * Class constructor specifying the {@link RenderBlocks}. + * + * @param renderBlocks the {@link RenderBlocks} + */ + public LightingHelper(RenderBlocks renderBlocks) { + this.renderBlocks = renderBlocks; + if (renderBlocks.useInventoryTint) { + // Block will be rendered in an inventory, so it needs its lightness maxed + setLightnessOverride(1.0F); + } + } + + /** + * Gets average brightness from two brightness values. + * + * @param brightnessA the first brightness value + * @param brightnessB the second brightness value + * @return the mixed brightness + */ + public static int getAverageBrightness(int brightnessA, int brightnessB) { + int sectionA1 = brightnessA >> 16 & 0xff; + int sectionA2 = brightnessA & 255; + + int sectionB1 = brightnessB >> 16 & 0xff; + int sectionB2 = brightnessB & 255; + + int difference1 = (int) ((sectionA1 + sectionB1) / 2.0F); + int difference2 = (int) ((sectionA2 + sectionB2) / 2.0F); + + return difference1 << 16 | difference2; + } + + /** + * Gets rgb color from RGBA array. + * + * @param color the integer color + * @return a float array with rgb values + */ + public static float[] getRGB(short[] color) { + float red = color[0] / 255.0F; + float green = color[1] / 255.0F; + float blue = color[2] / 255.0F; + + return new float[]{red, green, blue}; + } + + /** + * Clears brightness override. + */ + public void clearBrightnessOverride() { + hasBrightnessOverride = false; + } + + /** + * Clears color override. + */ + public void clearColorOverride() { + hasColorOverride = false; + } + + /** + * Clears lightness override. + */ + public void clearLightnessOverride() { + hasLightnessOverride = false; + } + + /** + * @return the Ambient Occlusion for Bottom-Left corner + */ + public float getAoBottomLeft() { + return aoBottomLeft; + } + + /** + * @return the Ambient Occlusion for Bottom-Right corner + */ + public float getAoBottomRight() { + return aoBottomRight; + } + + /** + * @return the Ambient Occlusion for Top-Left corner + */ + public float getAoTopLeft() { + return aoTopLeft; + } + + /** + * @return the Ambient Occlusion for Top-Right corner + */ + public float getAoTopRight() { + return aoTopRight; + } + + /** + * Sets brightness override. + * + * @param brightness the brightness override + * @return the {@link LightingHelper} + */ + public LightingHelper setBrightnessOverride(int brightness) { + hasBrightnessOverride = true; + brightnessOverride = brightness; + return this; + } + + public LightingHelper setColorOverride(short[] color) { + return setColorOverride(getColor(color)); + } + + /** + * Sets color override. + * + * @param color the color override + * @return the {@link LightingHelper} + */ + public LightingHelper setColorOverride(int color) { + hasColorOverride = true; + colorOverride = color; + return this; + } + + /** + * Gets int color from RGBA array. + * + * @param rgba the short RGBA color array + * @return int color + */ + public static int getColor(short[] rgba) { + return (rgba[2] & 0xff) | (rgba[1] & 0xff) << 8 | (rgba[0] & 0xff) << 16; + } + + /** + * Sets lightness override. + * + * @param lightness the lightness override + * @return the {@link LightingHelper} + */ + public LightingHelper setLightnessOverride(float lightness) { + hasLightnessOverride = true; + lightnessOverride = lightness; + return this; + } + + /** + * 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 + */ + public void setupColor(int side, short[] rgba) { + setupColor(side, getColor(rgba)); + } + + /** + * 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 + */ + public void setupColor(int side, int hexColor) { + Tessellator tessellator = Tessellator.instance; + float lightness = hasLightnessOverride ? lightnessOverride : LIGHTNESS[side]; + float[] rgb = getRGB(hexColor); + + if (hasColorOverride && !renderBlocks.hasOverrideBlockTexture()) { + rgb = getRGB(colorOverride); + } + + applyAnaglyph(rgb); + + if (renderBlocks.enableAO) { + tessellator.setBrightness(hasBrightnessOverride ? brightnessOverride : brightness); + + 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]; + + } 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 *= aoTopLeft; + renderBlocks.colorGreenTopLeft *= aoTopLeft; + renderBlocks.colorBlueTopLeft *= aoTopLeft; + renderBlocks.colorRedBottomLeft *= aoBottomLeft; + renderBlocks.colorGreenBottomLeft *= aoBottomLeft; + renderBlocks.colorBlueBottomLeft *= aoBottomLeft; + renderBlocks.colorRedBottomRight *= aoBottomRight; + renderBlocks.colorGreenBottomRight *= aoBottomRight; + renderBlocks.colorBlueBottomRight *= aoBottomRight; + renderBlocks.colorRedTopRight *= aoTopRight; + renderBlocks.colorGreenTopRight *= aoTopRight; + renderBlocks.colorBlueTopRight *= aoTopRight; + } + + } else { + + tessellator.setColorOpaque_F(rgb[0] * lightness, rgb[1] * lightness, rgb[2] * lightness); + + } + } + + /** + * Gets rgb color from integer. + * + * @param color the integer color + * @return a float array with rgb values + */ + public static float[] getRGB(int color) { + float red = (color >> 16 & 0xff) / 255.0F; + float green = (color >> 8 & 0xff) / 255.0F; + float blue = (color & 0xff) / 255.0F; + + 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. + * + * @param rgb array containing red, green and blue float values + */ + public void applyAnaglyph(float[] rgb) { + if (EntityRenderer.anaglyphEnable) { + rgb[0] = (rgb[0] * 30.0F + rgb[1] * 59.0F + rgb[2] * 11.0F) / 100.0F; + rgb[1] = (rgb[0] * 30.0F + rgb[1] * 70.0F) / 100.0F; + rgb[2] = (rgb[0] * 30.0F + rgb[2] * 70.0F) / 100.0F; + } + } + + /** + * 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 + * @param ratio the ratio for mixing + * @return the mixed red, green, blue float values + */ + public static float getMixedAo(float ao1, float ao2, double ratio) { + float diff = (float) (Math.abs(ao1 - ao2) * (1.0F - ratio)); + + return ao1 > ao2 ? ao1 - diff : ao1 + diff; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingXNeg(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int xOffset = renderBlocks.renderMinX > 0.0F + NO_Z_FIGHT_OFFSET ? x : x - 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z); + brightness = mixedBrightness; + + float ratio = (float) (1.0F - renderBlocks.renderMinX); + float aoLightValue = renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXYNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); + renderBlocks.aoBrightnessXZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); + renderBlocks.aoBrightnessXZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); + renderBlocks.aoBrightnessXYNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); + renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); + renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); + renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); + renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); + renderBlocks.aoLightValueScratchXYNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), ratio); + + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessXYNP, mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXZNN, mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXZNP, mixedBrightness); + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessXYZNPP, mixedBrightness); + + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + aoLightValue + renderBlocks.aoLightValueScratchXYZNPN + renderBlocks.aoLightValueScratchXYNP) / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXZNN + aoLightValue) / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXYZNNP + aoLightValue + renderBlocks.aoLightValueScratchXZNP) / 4.0F; + float aoMixedXYZNPP = (aoLightValue + renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchXYZNPP) / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); + aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); + aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMinZ + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); + aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMaxY * renderBlocks.renderMaxZ, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMaxY * renderBlocks.renderMinZ, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMinY * renderBlocks.renderMinZ, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMinY * renderBlocks.renderMaxZ, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); + + } + + return this; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingXPos(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int xOffset = renderBlocks.renderMaxX < 1.0F - NO_Z_FIGHT_OFFSET ? x : x + 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z); + brightness = mixedBrightness; + + float aoLightValue = renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXYPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); + renderBlocks.aoBrightnessXZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); + renderBlocks.aoBrightnessXZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); + renderBlocks.aoBrightnessXYPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); + renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); + renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); + renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); + renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); + renderBlocks.aoLightValueScratchXYPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); + + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZPP, renderBlocks.aoBrightnessXYPP, renderBlocks.aoBrightnessXYZPPP, mixedBrightness); + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXZPP, mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZPNN, renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXZPN, mixedBrightness); + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZPN, renderBlocks.aoBrightnessXYZPPN, renderBlocks.aoBrightnessXYPP, mixedBrightness); + + float aoMixedXYZPPP = (aoLightValue + renderBlocks.aoLightValueScratchXZPP + renderBlocks.aoLightValueScratchXYPP + renderBlocks.aoLightValueScratchXYZPPP) / 4.0F; + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXYZPNP + aoLightValue + renderBlocks.aoLightValueScratchXZPP) / 4.0F; + float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchXYZPNN + renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXZPN + aoLightValue) / 4.0F; + float aoMixedXYZPPN = (renderBlocks.aoLightValueScratchXZPN + aoLightValue + renderBlocks.aoLightValueScratchXYZPPN + renderBlocks.aoLightValueScratchXYPP) / 4.0F; + + aoTopLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ); + aoBottomLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinZ); + aoBottomRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ); + aoTopRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMinY * renderBlocks.renderMaxZ); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMinY * renderBlocks.renderMinZ); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMaxY * renderBlocks.renderMinZ); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMaxY * renderBlocks.renderMaxZ); + + } + + return this; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingYNeg(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int yOffset = renderBlocks.renderMinY > 0.0F + NO_Z_FIGHT_OFFSET ? y : y - 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z); + brightness = mixedBrightness; + + float ratio = (float) (1.0F - renderBlocks.renderMinY); + float aoLightValue = renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXYNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); + renderBlocks.aoBrightnessYZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); + renderBlocks.aoBrightnessYZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); + renderBlocks.aoBrightnessXYPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); + renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); + renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); + renderBlocks.aoLightValueScratchXYNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchYZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchYZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), ratio); + + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNP, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXYPN, mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNN, renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXYZPNN, mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessYZNN, mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessYZNP, mixedBrightness); + + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + aoLightValue + renderBlocks.aoLightValueScratchXYZPNP + renderBlocks.aoLightValueScratchXYPN) / 4.0F; + float aoMixedXYZPNN = (aoLightValue + renderBlocks.aoLightValueScratchYZNN + renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXYZPNN) / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXYZNNN + aoLightValue + renderBlocks.aoLightValueScratchYZNN) / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchYZNP + aoLightValue) / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + aoBottomRight = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + + } + + return this; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingYPos(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int yOffset = renderBlocks.renderMaxY < 1.0F - NO_Z_FIGHT_OFFSET ? y : y + 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z); + brightness = mixedBrightness; + + float aoLightValue = renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXYNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); + renderBlocks.aoBrightnessXYPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); + renderBlocks.aoBrightnessYZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); + renderBlocks.aoBrightnessYZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); + renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); + renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); + renderBlocks.aoLightValueScratchXYNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchYZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchYZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); + + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPP, renderBlocks.aoBrightnessXYZPPP, renderBlocks.aoBrightnessXYPP, mixedBrightness); + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPN, renderBlocks.aoBrightnessXYPP, renderBlocks.aoBrightnessXYZPPN, mixedBrightness); + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessYZPN, mixedBrightness); + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNPP, renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessYZPP, mixedBrightness); + + float aoMixedXYZPPP = (renderBlocks.aoLightValueScratchYZPP + aoLightValue + renderBlocks.aoLightValueScratchXYZPPP + renderBlocks.aoLightValueScratchXYPP) / 4.0F; + float aoMixedXYZPPN = (aoLightValue + renderBlocks.aoLightValueScratchYZPN + renderBlocks.aoLightValueScratchXYPP + renderBlocks.aoLightValueScratchXYZPPN) / 4.0F; + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchXYZNPN + aoLightValue + renderBlocks.aoLightValueScratchYZPN) / 4.0F; + float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXYZNPP + renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchYZPP + aoLightValue) / 4.0F; + + aoTopLeft /*SE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + aoBottomLeft /*NE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + aoBottomRight /*NW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMinX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + aoTopRight /*SW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + } + + return this; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingZNeg(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int zOffset = renderBlocks.renderMinZ > 0.0F + NO_Z_FIGHT_OFFSET ? z : z - 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y, zOffset); + brightness = mixedBrightness; + + float ratio = (float) (1.0F - renderBlocks.renderMinZ); + float aoLightValue = renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); + renderBlocks.aoBrightnessYZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); + renderBlocks.aoBrightnessYZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); + renderBlocks.aoBrightnessXZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); + renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); + renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); + renderBlocks.aoLightValueScratchXZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchYZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchYZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), ratio); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), ratio); + + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPN, renderBlocks.aoBrightnessXZPN, renderBlocks.aoBrightnessXYZPPN, mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNN, renderBlocks.aoBrightnessXYZPNN, renderBlocks.aoBrightnessXZPN, mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessYZNN, mixedBrightness); + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessYZPN, mixedBrightness); + + float aoMixedXYZPPN = (aoLightValue + renderBlocks.aoLightValueScratchYZPN + renderBlocks.aoLightValueScratchXZPN + renderBlocks.aoLightValueScratchXYZPPN) / 4.0F; + float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchYZNN + aoLightValue + renderBlocks.aoLightValueScratchXYZPNN + renderBlocks.aoLightValueScratchXZPN) / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + renderBlocks.aoLightValueScratchXZNN + renderBlocks.aoLightValueScratchYZNN + aoLightValue) / 4.0F; + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + renderBlocks.aoLightValueScratchXYZNPN + aoLightValue + renderBlocks.aoLightValueScratchYZPN) / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + aoBottomRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxY * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxY * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinY * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinY * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); + + } + + return this; + } + + /** + * 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: + * <p> + * <ul> + * <li>{@link RenderBlocks#enableAO}</li> + * <li>{@link RenderBlocks#partialRenderBounds}</li> + * </ul> + * + * @param block the block {@link Block} + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the {@link LightingHelper} + */ + public LightingHelper setupLightingZPos(Block block, int x, int y, int z) { + + if (renderBlocks.enableAO) { + + int zOffset = renderBlocks.renderMaxZ < 1.0F - NO_Z_FIGHT_OFFSET ? z : z + 1; + + int mixedBrightness = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y, zOffset); + brightness = mixedBrightness; + + float aoLightValue = renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(); + + renderBlocks.aoBrightnessXZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); + renderBlocks.aoBrightnessXZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); + renderBlocks.aoBrightnessYZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); + renderBlocks.aoBrightnessYZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); + renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); + renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); + renderBlocks.aoLightValueScratchXZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchYZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchYZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); + + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessXYZNPP, renderBlocks.aoBrightnessYZPP, mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessYZNP, mixedBrightness); + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNP, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXZPP, mixedBrightness); + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPP, renderBlocks.aoBrightnessXZPP, renderBlocks.aoBrightnessXYZPPP, mixedBrightness); + + float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchXYZNPP + aoLightValue + renderBlocks.aoLightValueScratchYZPP) / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchYZNP + aoLightValue) / 4.0F; + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + aoLightValue + renderBlocks.aoLightValueScratchXYZPNP + renderBlocks.aoLightValueScratchXZPP) / 4.0F; + float aoMixedXYZPPP = (aoLightValue + renderBlocks.aoLightValueScratchYZPP + renderBlocks.aoLightValueScratchXZPP + renderBlocks.aoLightValueScratchXYZPPP) / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); + aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, renderBlocks.renderMaxY * renderBlocks.renderMinX); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, renderBlocks.renderMinY * renderBlocks.renderMinX); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, renderBlocks.renderMinY * renderBlocks.renderMaxX); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, renderBlocks.renderMaxY * renderBlocks.renderMaxX); + } + + return this; + } +} diff --git a/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java new file mode 100644 index 0000000000..354b3748be --- /dev/null +++ b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java @@ -0,0 +1,604 @@ +package gregtech.api.util; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +import java.util.Objects; +import java.util.function.BiConsumer; +import java.util.function.Consumer; + +@SuppressWarnings("unused") +public abstract class WorldSpawnedEventBuilder implements Runnable { + private static final String ILLEGAL_STATE_STR1 = "Position, identifier and world must be set"; + /* Variables */ + + private World world; + + /* Getters, Setters */ + + public World getWorld() { + return world; + } + + public WorldSpawnedEventBuilder setWorld(World world) { + this.world = world; + return this; + } + + /* Methodes */ + + @SuppressWarnings("unchecked") + public <U extends WorldSpawnedEventBuilder> void times(int times, Consumer<U> action) { + Objects.requireNonNull(action); + for (int i = 0; i < times; i++) { + action.accept((U) this); + } + } + + @SuppressWarnings("unchecked") + public <U extends WorldSpawnedEventBuilder> void times(int times, BiConsumer<U, Integer> action) { + Objects.requireNonNull(action); + for (int i = 0; i < times; i++) { + action.accept((U) this, i); + } + } + + /* Interfaces */ + + private interface IPositionedWorldSpawnedEvent { + Vec3 getPosition(); + IPositionedWorldSpawnedEvent setPosition(Vec3 position); + IPositionedWorldSpawnedEvent setPosition(double x, double y, double z); + } + + private interface IEntityWorldSpawnedEvent { + Entity getEntity(); + IEntityWorldSpawnedEvent setEntity(Entity entity); + } + + private interface IEntityPlayerWorldSpawnedEvent { + EntityPlayer getEntityPlayer(); + IEntityPlayerWorldSpawnedEvent setEntityPlayer(EntityPlayer entity); + } + + private interface IStringIdentifierWorldSpawnedEvent { + String getIdentifier(); + IStringIdentifierWorldSpawnedEvent setIdentifier(String identifier); + } + + private interface ISoundWorldSpawnedEvent { + float getPitch(); + float getVolume(); + ISoundWorldSpawnedEvent setPitch(float pitch); + ISoundWorldSpawnedEvent setVolume(float volume); + } + + /* Abstract Classes */ + + private abstract static class EntityWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder implements IEntityWorldSpawnedEvent { + + private Entity entity; + + @Override + public Entity getEntity() { + return entity; + } + + @Override + public EntityWorldSpawnedEventBuilder setEntity(Entity entity) { + this.entity = entity; + return this; + } + } + + private abstract static class PositionedEntityWorldSpawnedEventBuilder extends EntityWorldSpawnedEventBuilder implements IPositionedWorldSpawnedEvent { + + private Vec3 position; + + @Override + public Vec3 getPosition() { + return position; + } + + @Override + public PositionedEntityWorldSpawnedEventBuilder setPosition(Vec3 position) { + this.position = position; + return this; + } + + @Override + public PositionedEntityWorldSpawnedEventBuilder setPosition(double x, double y, double z) { + this.position = Vec3.createVectorHelper(x, y, z); + return this; + } + + } + + private abstract static class PositionedWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder implements IPositionedWorldSpawnedEvent { + private Vec3 position; + + @Override + public Vec3 getPosition() { + return position; + } + + @Override + public PositionedWorldSpawnedEventBuilder setPosition(Vec3 position) { + this.position = position; + return this; + } + + @Override + public PositionedWorldSpawnedEventBuilder setPosition(double x, double y, double z) { + this.position = Vec3.createVectorHelper(x, y, z); + return this; + } + } + + private abstract static class StringIdentifierPositionedWorldSpawnedEventBuilder extends PositionedWorldSpawnedEventBuilder implements IStringIdentifierWorldSpawnedEvent { + private String identifier; + + @Override + public String getIdentifier() { + return identifier; + } + + @Override + public StringIdentifierPositionedWorldSpawnedEventBuilder setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + } + + private abstract static class SoundStringIdentifierPositionedWorldSpawnedEventBuilder extends StringIdentifierPositionedWorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent { + + private float pitch; + private float volume; + + @Override + public float getPitch() { + return pitch; + } + + @Override + public float getVolume() { + return volume; + } + + @Override + public SoundStringIdentifierPositionedWorldSpawnedEventBuilder setPitch(float pitch) { + this.pitch = pitch; + return this; + } + + @Override + public SoundStringIdentifierPositionedWorldSpawnedEventBuilder setVolume(float volume) { + this.volume = volume; + return this; + } + } + + /* Implementations */ + + public static final class ParticleEventBuilder extends StringIdentifierPositionedWorldSpawnedEventBuilder { + + private Vec3 motion; + + public Vec3 getMotion() { + return motion; + } + + public ParticleEventBuilder setMotion(double x, double y, double z) { + this.motion = Vec3.createVectorHelper(x, y, z); + return this; + } + + public ParticleEventBuilder setMotion(Vec3 motion) { + this.motion = motion; + return this; + } + + @Override + public ParticleEventBuilder setWorld(World world) { + return (ParticleEventBuilder) super.setWorld(world); + } + + @Override + public ParticleEventBuilder setPosition(Vec3 position) { + return (ParticleEventBuilder) super.setPosition(position); + } + + @Override + public ParticleEventBuilder setPosition(double x, double y, double z) { + return (ParticleEventBuilder) super.setPosition(x, y, z); + } + + @Override + public ParticleEventBuilder setIdentifier(String identifier) { + return (ParticleEventBuilder) super.setIdentifier(identifier); + } + + @Override + public void run() { + 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 + ); + } + } + + public static final class SoundEffectEventBuilder extends SoundStringIdentifierPositionedWorldSpawnedEventBuilder { + + @Override + public SoundEffectEventBuilder setWorld(World world) { + return (SoundEffectEventBuilder) super.setWorld(world); + } + + @Override + public SoundEffectEventBuilder setPosition(Vec3 position) { + return (SoundEffectEventBuilder) super.setPosition(position); + } + + @Override + public SoundEffectEventBuilder setPosition(double x, double y, double z) { + return (SoundEffectEventBuilder) super.setPosition(x, y, z); + } + + @Override + public SoundEffectEventBuilder setIdentifier(String identifier) { + return (SoundEffectEventBuilder) super.setIdentifier(identifier); + } + + @Override + public SoundEffectEventBuilder setPitch(float pitch) { + return (SoundEffectEventBuilder) super.setPitch(pitch); + } + + @Override + public SoundEffectEventBuilder setVolume(float volume) { + return (SoundEffectEventBuilder) super.setVolume(volume); + } + + @Override + public void run() { + if (getPosition() == null || getIdentifier() == null || getWorld() == null) + throw new IllegalStateException(ILLEGAL_STATE_STR1); + + getWorld().playSoundEffect( + getPosition().xCoord, getPosition().yCoord, getPosition().zCoord, + getIdentifier(), + getPitch(), getVolume() + ); + } + } + + public static final class SoundEventBuilder extends SoundStringIdentifierPositionedWorldSpawnedEventBuilder { + + private boolean proximity; + + public boolean isProximity() { + return proximity; + } + + @Override + public SoundEventBuilder setWorld(World world) { + return (SoundEventBuilder) super.setWorld(world); + } + + @Override + public SoundEventBuilder setPosition(Vec3 position) { + return (SoundEventBuilder) super.setPosition(position); + } + + @Override + public SoundEventBuilder setPosition(double x, double y, double z) { + return (SoundEventBuilder) super.setPosition(x, y, z); + } + + @Override + public SoundEventBuilder setIdentifier(String identifier) { + return (SoundEventBuilder) super.setIdentifier(identifier); + } + + @Override + public SoundEventBuilder setPitch(float pitch) { + return (SoundEventBuilder) super.setPitch(pitch); + } + + @Override + public SoundEventBuilder setVolume(float volume) { + return (SoundEventBuilder) super.setVolume(volume); + } + + public SoundEventBuilder setProximity(boolean proximity) { + this.proximity = proximity; + return this; + } + + @Override + public void run() { + 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() + ); + } + } + + /** + * Positional Data is rounded down due to this targeting a block. + */ + public static final class RecordEffectEventBuilder extends StringIdentifierPositionedWorldSpawnedEventBuilder { + + @Override + public RecordEffectEventBuilder setWorld(World world) { + return (RecordEffectEventBuilder) super.setWorld(world); + } + + @Override + public RecordEffectEventBuilder setPosition(Vec3 position) { + return (RecordEffectEventBuilder) super.setPosition(position); + } + + @Override + public RecordEffectEventBuilder setPosition(double x, double y, double z) { + return (RecordEffectEventBuilder) super.setPosition(x, y, z); + } + + @Override + public RecordEffectEventBuilder setIdentifier(String identifier) { + return (RecordEffectEventBuilder) super.setIdentifier(identifier); + } + + @Override + public void run() { + 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 + ); + } + } + + public static final class ExplosionEffectEventBuilder extends PositionedEntityWorldSpawnedEventBuilder { + private boolean isFlaming, isSmoking; + private float strength; + + + public float getStrength() { + return strength; + } + + public ExplosionEffectEventBuilder setStrength(float strength) { + this.strength = strength; + return this; + } + + public boolean isFlaming() { + return isFlaming; + } + + public ExplosionEffectEventBuilder setFlaming(boolean flaming) { + isFlaming = flaming; + return this; + } + + public boolean isSmoking() { + return isSmoking; + } + + public ExplosionEffectEventBuilder setSmoking(boolean smoking) { + isSmoking = smoking; + return this; + } + + @Override + public ExplosionEffectEventBuilder setWorld(World world) { + return (ExplosionEffectEventBuilder) super.setWorld(world); + } + + @Override + public ExplosionEffectEventBuilder setEntity(Entity entity) { + return (ExplosionEffectEventBuilder) super.setEntity(entity); + } + + @Override + public ExplosionEffectEventBuilder setPosition(double x, double y, double z) { + return (ExplosionEffectEventBuilder) super.setPosition(x, y, z); + } + + @Override + public void run() { + 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); + } + } + + /** + * Positional Data is rounded down due to this targeting a block. + */ + public static final class ExtinguishFireEffectEventBuilder extends PositionedWorldSpawnedEventBuilder implements IEntityPlayerWorldSpawnedEvent { + + private int side; + private EntityPlayer entityPlayer; + + public int getSide() { + return side; + } + + public ExtinguishFireEffectEventBuilder setSide(int side) { + this.side = side; + return this; + } + + @Override + public EntityPlayer getEntityPlayer() { + return entityPlayer; + } + + @Override + public ExtinguishFireEffectEventBuilder setEntityPlayer(EntityPlayer entity) { + this.entityPlayer = entity; + return this; + } + + @Override + public ExtinguishFireEffectEventBuilder setWorld(World world) { + return (ExtinguishFireEffectEventBuilder) super.setWorld(world); + } + + @Override + public ExtinguishFireEffectEventBuilder setPosition(Vec3 position) { + return (ExtinguishFireEffectEventBuilder) super.setPosition(position); + } + + @Override + public ExtinguishFireEffectEventBuilder setPosition(double x, double y, double z) { + return (ExtinguishFireEffectEventBuilder) super.setPosition(x, y, z); + } + + @Override + public void run() { + 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); + } + } + + public static final class SoundAtEntityEventBuilder extends EntityWorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent { + + private float pitch; + private float volume; + private String identifier; + + @Override + public String getIdentifier() { + return identifier; + } + + @Override + public SoundAtEntityEventBuilder setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + @Override + public float getPitch() { + return pitch; + } + + @Override + public float getVolume() { + return volume; + } + + @Override + public SoundAtEntityEventBuilder setPitch(float pitch) { + this.pitch = pitch; + return this; + } + + @Override + public SoundAtEntityEventBuilder setVolume(float volume) { + this.volume = volume; + return this; + } + + @Override + public SoundAtEntityEventBuilder setWorld(World world) { + return (SoundAtEntityEventBuilder) super.setWorld(world); + } + + @Override + public SoundAtEntityEventBuilder setEntity(Entity entity) { + return (SoundAtEntityEventBuilder) super.setEntity(entity); + } + + @Override + public void run() { + if (getWorld() == null || getIdentifier() == null || getEntity() == null) + throw new IllegalStateException("World, Identifier and entity must be set!"); + + getWorld().playSoundAtEntity(getEntity(), getIdentifier(), volume, pitch); + } + } + + public static final class SoundToNearExceptEventBuilder extends WorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent, IEntityPlayerWorldSpawnedEvent { + + private float pitch; + private float volume; + private String identifier; + private EntityPlayer entityPlayer; + + @Override + public String getIdentifier() { + return identifier; + } + + @Override + public SoundToNearExceptEventBuilder setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + @Override + public float getPitch() { + return pitch; + } + + @Override + public float getVolume() { + return volume; + } + + @Override + public SoundToNearExceptEventBuilder setPitch(float pitch) { + this.pitch = pitch; + return this; + } + + @Override + public SoundToNearExceptEventBuilder setVolume(float volume) { + this.volume = volume; + return this; + } + + @Override + public SoundToNearExceptEventBuilder setWorld(World world) { + return (SoundToNearExceptEventBuilder) super.setWorld(world); + } + + @Override + public void run() { + if (getWorld() == null || getIdentifier() == null || getEntityPlayer() == null) + throw new IllegalStateException("World, Identifier and EntityPlayer must be set!"); + + getWorld().playSoundAtEntity(getEntityPlayer(), getIdentifier(), volume, pitch); + } + + @Override + public EntityPlayer getEntityPlayer() { + return entityPlayer; + } + + @Override + public SoundToNearExceptEventBuilder setEntityPlayer(EntityPlayer entity) { + entityPlayer = entity; + return this; + } + } +} diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Boulder.java b/src/main/java/gregtech/api/world/GT_Worldgen_Boulder.java index 22bf17aa93..5fe54af782 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Boulder.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Boulder.java @@ -73,4 +73,4 @@ public class GT_Worldgen_Boulder extends GT_Worldgen_Ore { } return false; } -}
\ No newline at end of file +} 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 e8d16526c1..5d82d2798f 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java @@ -27,4 +27,4 @@ public abstract class GT_Worldgen_Ore extends GT_Worldgen { else mBiomeList = aBiomeList; mAllowToGenerateinVoid = aAllowToGenerateinVoid; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java index 59ff49effb..035b6fa28e 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_Normal.java @@ -71,4 +71,4 @@ public class GT_Worldgen_Ore_Normal extends GT_Worldgen_Ore { } return false; } -}
\ No newline at end of file +} 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 8cdc75c0ce..7205eef4a5 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 @@ -27,4 +27,4 @@ public class GT_Worldgen_Ore_SingleBlock extends GT_Worldgen_Ore { } return false; } -}
\ No newline at end of file +} 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 f7df920708..16f6d37555 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 @@ -28,4 +28,4 @@ public class GT_Worldgen_Ore_SingleBlock_UnderLava extends GT_Worldgen_Ore { } return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index e528323da4..d66972e882 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -9,33 +9,37 @@ import codechicken.lib.vec.Rotation; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; +import gregtech.api.interfaces.IHasFluidDisplayItem; import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.BaseTileEntity; +import gregtech.api.net.GT_Packet_ClientPreference; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_PlayedSound; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; +import gregtech.common.net.MessageUpdateFluidDisplayItem; import gregtech.common.render.*; import ic2.api.tile.IWrenchable; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatFileWriter; 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.event.world.WorldEvent; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; @@ -58,7 +62,7 @@ public class GT_Client extends GT_Proxy } private final HashSet<String> mCapeList = new HashSet<>(); - public final static GT_PollutionRenderer mPollutionRenderer = new GT_PollutionRenderer(); + public static final GT_PollutionRenderer mPollutionRenderer = new GT_PollutionRenderer(); private final GT_CapeRenderer mCapeRenderer; private final List mPosR; private final List mPosG; @@ -80,8 +84,13 @@ public class GT_Client extends GT_Proxy /**This is the place to def the value used below**/ private long afterSomeTime; private boolean mAnimationDirection; + private int mLastUpdatedBlockX; + private int mLastUpdatedBlockY; + private int mLastUpdatedBlockZ; private boolean isFirstClientPlayerTick; private String mMessage; + private GT_ClientPreference mPreference; + private boolean mFirstTick = false; public GT_Client() { mCapeRenderer = new GT_CapeRenderer(mCapeList); mAnimationTick = 0L; @@ -249,26 +258,32 @@ public class GT_Client extends GT_Proxy drawGrid(aEvent, false); } + @Override public boolean isServerSide() { return true; } + @Override public boolean isClientSide() { return true; } + @Override public boolean isBukkitSide() { return false; } + @Override public EntityPlayer getThePlayer() { return Minecraft.getMinecraft().thePlayer; } + @Override public int addArmor(String aPrefix) { return RenderingRegistry.addNewArmourRendererPrefix(aPrefix); } + @Override public void onPreLoad() { super.onPreLoad(); String arr$[] = { @@ -294,8 +309,11 @@ public class GT_Client extends GT_Proxy (new Thread(this)).start(); mPollutionRenderer.preLoad(); + + mPreference = new GT_ClientPreference(GregTech_API.sClientDataFile); } + @Override public void onLoad() { super.onLoad(); new GT_Renderer_Block(); @@ -307,6 +325,7 @@ public class GT_Client extends GT_Proxy new GT_FluidDisplayStackRenderer(); } + @Override public void onPostLoad() { super.onPostLoad(); try { @@ -315,8 +334,10 @@ public class GT_Client extends GT_Proxy do { if (i >= GregTech_API.METATILEENTITIES.length) continue label0; - if (GregTech_API.METATILEENTITIES[i] != null) + if (GregTech_API.METATILEENTITIES[i] != null) { GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); + GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); + } i++; } while (true); } catch (Throwable e) {e.printStackTrace(GT_Log.err);} @@ -333,6 +354,7 @@ public class GT_Client extends GT_Proxy // } } + @Override public void run() { try { GT_Log.out.println("GT_Mod: Downloading Cape List."); @@ -376,7 +398,13 @@ public class GT_Client extends GT_Proxy } catch (Throwable e) { }**/ } - + + @Override + @SubscribeEvent + public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) { + mFirstTick = true; + } + @SubscribeEvent public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { mCapeRenderer.receiveRenderSpecialsEvent(aEvent); @@ -385,15 +413,19 @@ public class GT_Client extends GT_Proxy @SubscribeEvent public void onPlayerTickEventClient(TickEvent.PlayerTickEvent aEvent) { if ((aEvent.side.isClient()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) { + if (mFirstTick) { + mFirstTick = false; + GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); + } afterSomeTime++; - if(afterSomeTime>=100L){ + if(afterSomeTime>=100L) { afterSomeTime=0; StatFileWriter sfw= Minecraft.getMinecraft().thePlayer.getStatFileWriter(); try { - for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ - recipe.mHidden=!sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); + for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { + recipe.mHidden=GT_Values.hideAssLineRecipes && !sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); } - }catch (Exception e){} + } catch (Exception ignored){} } ArrayList<GT_PlayedSound> tList = new ArrayList(); for (Map.Entry<GT_PlayedSound, Integer> tEntry : GT_Utility.sPlayedSoundMap.entrySet()) { @@ -407,30 +439,25 @@ public class GT_Client extends GT_Proxy for (Iterator i$ = tList.iterator(); i$.hasNext(); GT_Utility.sPlayedSoundMap.remove(tKey)) { tKey = (GT_PlayedSound) i$.next(); } - if(GregTech_API.mServerStarted == false)GregTech_API.mServerStarted = true; - /*if ((this.isFirstClientPlayerTick) && (aEvent.player == GT_Values.GT.getThePlayer())) { - this.isFirstClientPlayerTick = false; - GT_FluidStack.fixAllThoseFuckingFluidIDs(); - if ((this.mMessage.length() > 5) && (GregTech_API.sSpecialFile.get(ConfigCategories.news, this.mMessage, true))) { - aEvent.player.addChatComponentMessage(new ChatComponentText(this.mMessage)); - } - try { - int tVersion = Integer.parseInt(((String) Class.forName("ic2.core.IC2").getField("VERSION").get(null)).substring(4, 7)); - if (GT_Values.D1) { - GT_Log.out.println("Industrialcraft Version: " + tVersion); - } - if (tVersion < 624) { - aEvent.player.addChatComponentMessage(new ChatComponentText("GregTech: Please update your IndustrialCraft here:")); - aEvent.player.addChatComponentMessage(new ChatComponentText("ic2api.player.to:8080/job/IC2_experimental/" + (GT_Mod.MAX_IC2 < Integer.MAX_VALUE ? GT_Mod.MAX_IC2 : 624) + "/")); - } else if (tVersion > GT_Mod.MAX_IC2) { - aEvent.player.addChatComponentMessage(new ChatComponentText("GregTech: Please downgrade your IndustrialCraft here:")); - aEvent.player.addChatComponentMessage(new ChatComponentText("ic2api.player.to:8080/job/IC2_experimental/" + GT_Mod.MAX_IC2 + "/")); + if(!GregTech_API.mServerStarted) GregTech_API.mServerStarted = true; + if (GT_Values.updateFluidDisplayItems) { + 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)) { + mLastUpdatedBlockX = trace.blockX; + mLastUpdatedBlockY = trace.blockY; + mLastUpdatedBlockZ = trace.blockZ; + TileEntity tileEntity = aEvent.player.worldObj.getTileEntity(trace.blockX, trace.blockY, trace.blockZ); + if (tileEntity instanceof IGregTechTileEntity) { + 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)); + } } - } catch (Throwable e) { - aEvent.player.addChatComponentMessage(new ChatComponentText("GregTech: Please get the recommended Version of IndustrialCraft here:")); - aEvent.player.addChatComponentMessage(new ChatComponentText("ic2api.player.to:8080/job/IC2_experimental/" + (GT_Mod.MAX_IC2 < Integer.MAX_VALUE ? GT_Mod.MAX_IC2 : 624) + "/")); } - }*/ + } } } @@ -583,6 +610,7 @@ public class GT_Client extends GT_Proxy } } + @Override public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { if (GT_Utility.isStackInvalid(aStack)) return; @@ -657,13 +685,28 @@ public class GT_Client extends GT_Proxy tString = (new StringBuilder()).append(tString).append("wherearewenow").toString(); break; } - if (tString.startsWith("streaming.")) - aWorld.playRecord(tString.substring(10, tString.length()), (int) aX, (int) aY, (int) aZ); - else - aWorld.playSound(aX, aY, aZ, tString, 3F, tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F, false); + if (tString.startsWith("streaming.")){ + 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(); + } } 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> + */ public static int changeDetected=0; private static int shouldHeldItemHideThings() { diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index b2c15c6a0d..baab96510a 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -18,8 +18,7 @@ import net.minecraft.world.storage.WorldInfo; import java.io.File; -public class GT_DummyWorld - extends World { +public class GT_DummyWorld extends World { public GT_IteratorRandom mRandom = new GT_IteratorRandom(); public ItemStack mLastSetBlock = null; @@ -30,73 +29,78 @@ public class GT_DummyWorld public GT_DummyWorld() { this(new ISaveHandler() { + @Override public void saveWorldInfoWithPlayer(WorldInfo var1, NBTTagCompound var2) { } + @Override public void saveWorldInfo(WorldInfo var1) { } + @Override public WorldInfo loadWorldInfo() { return null; } + @Override public IPlayerFileData getSaveHandler() { return null; } + @Override public File getMapFileFromName(String var1) { return null; } + @Override public IChunkLoader getChunkLoader(WorldProvider var1) { 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 WorldProvider(), -// -// -// -// new WorldSettings(new WorldInfo(new NBTTagCompound())) -// { -// public String getDimensionName() -// { -// return "DUMMY_DIMENSION"; -// } -// } + new WorldSettings(new WorldInfo(new NBTTagCompound())), new Profiler()); } + @Override protected IChunkProvider createChunkProvider() { return null; } + @Override public Entity getEntityByID(int aEntityID) { return null; } + @Override public boolean setBlock(int aX, int aY, int aZ, Block aBlock, int aMeta, int aFlags) { this.mLastSetBlock = new ItemStack(aBlock, 1, aMeta); return true; } + @Override public float getSunBrightnessFactor(float p_72967_1_) { return 1.0F; } + @Override public BiomeGenBase getBiomeGenForCoords(int aX, int aZ) { if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { return BiomeGenBase.plains; @@ -104,10 +108,12 @@ public class GT_DummyWorld return BiomeGenBase.ocean; } + @Override public int getFullBlockLightValue(int aX, int aY, int aZ) { return 10; } + @Override public Block getBlock(int aX, int aY, int aZ) { if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { return aY == 64 ? Blocks.grass : Blocks.air; @@ -115,10 +121,12 @@ public class GT_DummyWorld return Blocks.air; } + @Override public int getBlockMetadata(int aX, int aY, int aZ) { return 0; } + @Override public boolean canBlockSeeTheSky(int aX, int aY, int aZ) { if ((aX >= 16) && (aZ >= 16) && (aX < 32) && (aZ < 32)) { return aY > 64; @@ -126,6 +134,7 @@ public class GT_DummyWorld return true; } + @Override protected int func_152379_p() { return 0; } diff --git a/src/main/java/gregtech/common/GT_IteratorRandom.java b/src/main/java/gregtech/common/GT_IteratorRandom.java index 79b8c2ae37..1141da4deb 100644 --- a/src/main/java/gregtech/common/GT_IteratorRandom.java +++ b/src/main/java/gregtech/common/GT_IteratorRandom.java @@ -2,11 +2,11 @@ package gregtech.common; import java.util.Random; -public class GT_IteratorRandom - extends Random { +public class GT_IteratorRandom extends Random { private static final long serialVersionUID = 1L; public int mIterationStep = 2147483647; + @Override public int nextInt(int aParameter) { if ((this.mIterationStep == 0) || (this.mIterationStep > aParameter)) { this.mIterationStep = aParameter; diff --git a/src/main/java/gregtech/common/GT_MinableOreGenerator.java b/src/main/java/gregtech/common/GT_MinableOreGenerator.java index c5249f1f25..2a1191b07e 100644 --- a/src/main/java/gregtech/common/GT_MinableOreGenerator.java +++ b/src/main/java/gregtech/common/GT_MinableOreGenerator.java @@ -8,8 +8,7 @@ import net.minecraft.world.gen.feature.WorldGenerator; import java.util.Random; -public class GT_MinableOreGenerator - extends WorldGenerator { +public class GT_MinableOreGenerator extends WorldGenerator { private Block minableBlockId; private Block mBlock; private int minableBlockMeta = 0; @@ -28,6 +27,7 @@ public class GT_MinableOreGenerator this.mBlock = aBlock; } + @Override public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { float math_pi = 3.141593F;//FB: CNT - CNT_ROUGH_CONSTANT_VALUE float var6 = par2Random.nextFloat() * math_pi; diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 5fd315b7ce..c9c57676ad 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -11,6 +11,8 @@ import gregtech.api.enums.GT_Values; import gregtech.api.net.*; import gregtech.common.blocks.GT_Packet_Ores; import gregtech.common.net.MessageSetFlaskCapacity; +import gregtech.common.net.MessageUpdateFluidDisplayItem; +import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; @@ -27,51 +29,62 @@ import java.util.List; import static gregtech.GT_Mod.GT_FML_LOGGER; @ChannelHandler.Sharable -public class GT_Network - extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> - implements IGT_NetworkHandler { +@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; public GT_Network() { - this.mChannel = NetworkRegistry.INSTANCE.newChannel("GregTech", new ChannelHandler[]{this, new HandlerShared()}); - this.mSubChannels = new GT_Packet[]{new GT_Packet_TileEntity(), new GT_Packet_Sound(), new GT_Packet_Block_Event(), new GT_Packet_Ores(), new GT_Packet_Pollution(), new MessageSetFlaskCapacity(), new GT_Packet_TileEntityCover(), new GT_Packet_TileEntityCoverGUI()}; + this.mChannel = NetworkRegistry.INSTANCE.newChannel("GregTech", this, new HandlerShared()); + this.mSubChannels = new GT_Packet[]{new GT_Packet_TileEntity(), new GT_Packet_Sound(), new GT_Packet_Block_Event(), new GT_Packet_Ores(), new GT_Packet_Pollution(), new MessageSetFlaskCapacity(), new GT_Packet_TileEntityCover(), new GT_Packet_TileEntityCoverGUI(), new MessageUpdateFluidDisplayItem(), new GT_Packet_ClientPreference(), new GT_Packet_WirelessRedstoneCover()}; } + @Override protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception { - aOutput.add(new FMLProxyPacket(Unpooled.buffer().writeByte(aPacket.getPacketID()).writeBytes(aPacket.encode()).copy(), (String) aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); + ByteBuf tBuf = Unpooled.buffer().writeByte(aPacket.getPacketID()); + aPacket.encode(tBuf); + 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 { ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array()); - aOutput.add(this.mSubChannels[aData.readByte()].decode(aData)); + GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData); + tPacket.setINetHandler(aPacket.handler()); + aOutput.add(tPacket); } + @Override public void sendToPlayer(GT_Packet aPacket, EntityPlayerMP aPlayer) { - if(aPacket==null){ - GT_FML_LOGGER.info("packet null");return; - } - if(aPlayer==null){ - GT_FML_LOGGER.info("player null");return; - } - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer); - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket); + if (aPacket == null) { + GT_FML_LOGGER.info("packet null"); + return; + } + if (aPlayer == null) { + GT_FML_LOGGER.info("player null"); + return; + } + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer); + this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } + @Override public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) { - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition); - ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket); + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition); + this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } + @Override public void sendToServer(GT_Packet aPacket) { - ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); - ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).writeAndFlush(aPacket); + this.mChannel.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); + this.mChannel.get(Side.CLIENT).writeAndFlush(aPacket); } + @Override public void sendPacketToAllPlayersInRange(World aWorld, GT_Packet aPacket, int aX, int aZ) { if (!aWorld.isRemote) { for (Object tObject : aWorld.playerEntities) { @@ -90,8 +103,8 @@ public class GT_Network @ChannelHandler.Sharable static final class HandlerShared extends SimpleChannelInboundHandler<GT_Packet> { - protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) - throws Exception { + @Override + protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) { EntityPlayer aPlayer = GT_Values.GT.getThePlayer(); aPacket.process(aPlayer == null ? null : GT_Values.GT.getThePlayer().worldObj); } diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index 7c275e76df..c6b9cb60d2 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -5,8 +5,8 @@ import gregtech.api.util.GT_Log; import java.util.ArrayList; -public class GT_PlayerActivityLogger - implements Runnable { +public class GT_PlayerActivityLogger implements Runnable { + @Override public void run() { try { for (; ; ) { diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index be49e57e4a..7b1ad90d52 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -11,7 +11,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; @@ -29,9 +28,11 @@ import java.util.HashMap; import java.util.List; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -import static gregtech.common.GT_Proxy.*; +import static gregtech.common.GT_Proxy.GTPOLLUTION; +import static gregtech.common.GT_Proxy.dimensionWiseChunkData; +import static gregtech.common.GT_Proxy.dimensionWisePollution; +import static gregtech.common.GT_Proxy.getDefaultChunkDataOnCreation; -//import net.minecraft.entity.EntityLiving; public class GT_Pollution { /** @@ -62,7 +63,9 @@ public class GT_Pollution { * * Machine Explosion(100,000) * - * Muffler Hatch Pollution reduction: + * Other Random Shit: lots and lots + * + * 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 @@ -310,6 +313,7 @@ public class GT_Pollution { public class GT_PollutionEventHandler { @SubscribeEvent public void chunkWatch(ChunkWatchEvent.Watch event) { + if(!GT_Mod.gregtechproxy.mPollution) return; if (chunkData.containsKey(event.chunk)) { int pollution = chunkData.get(event.chunk)[GTPOLLUTION]; if (pollution > POLLUTIONPACKET_MINVALUE) diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 5b762d6d58..636d78be51 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1,6 +1,10 @@ package gregtech.common; -import cpw.mods.fml.common.*; +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; @@ -11,8 +15,16 @@ import cpw.mods.fml.common.registry.GameRegistry; import forestry.api.genetics.AlleleManager; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Dyes; +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.SubTag; import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.enums.ToolDictNames; import gregtech.api.interfaces.IBlockOnWalkOver; import gregtech.api.interfaces.IProjectileItem; import gregtech.api.interfaces.internal.IGT_Mod; @@ -21,15 +33,12 @@ 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.net.GT_Packet_Pollution; import gregtech.api.objects.*; import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.gui.GT_ContainerVolumetricFlask; import gregtech.common.gui.GT_GUIContainerVolumetricFlask; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.armor.ModularArmor_Item; -import gregtech.common.items.armor.gui.*; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -39,7 +48,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -82,7 +90,22 @@ import org.apache.commons.lang3.text.WordUtils; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.text.DateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Date; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.stream.Collectors; +import java.util.concurrent.locks.ReentrantLock; import static gregtech.api.enums.GT_Values.debugEntityCramming; @@ -92,12 +115,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { OreGenEvent.GenerateMinable.EventType.IRON, OreGenEvent.GenerateMinable.EventType.GOLD, OreGenEvent.GenerateMinable.EventType.DIAMOND, OreGenEvent.GenerateMinable.EventType.REDSTONE, OreGenEvent.GenerateMinable.EventType.LAPIS, OreGenEvent.GenerateMinable.EventType.QUARTZ); - public final HashSet<ItemStack> mRegisteredOres = new HashSet<ItemStack>(10000); - public final ArrayList<String> mSoundNames = new ArrayList<String>(); - public final ArrayList<ItemStack> mSoundItems = new ArrayList<ItemStack>(); - public final ArrayList<Integer> mSoundCounts = new ArrayList<Integer>(); - private final Collection<OreDictEventContainer> mEvents = new HashSet<OreDictEventContainer>(); - private final Collection<String> mIgnoredItems = new HashSet<String>(Arrays.asList("itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater", + public final HashSet<ItemStack> mRegisteredOres = new HashSet<>(10000); + public final ArrayList<String> mSoundNames = new ArrayList<>(); + 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", @@ -108,7 +132,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { "itemWhippingCream", "itemGlisteningWhippingCream", "itemCleaver", "itemHerbalMedicineWhippingCream", "itemStrangeWhippingCream", "itemBlazeCleaver", "itemBakedCakeSponge", "itemMagmaCake", "itemGlisteningCake", "itemOgreCleaver", "itemFishandPumpkinCake", "itemMagmaWhippingCream", "itemMultimeter", "itemSuperconductor")); - private final Collection<String> mIgnoredNames = new HashSet<String>(Arrays.asList("grubBee", "chainLink", "candyCane", "bRedString", "bVial", + 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", @@ -125,8 +149,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { "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<String>(Arrays.asList("diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre", + "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", @@ -200,7 +224,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mTEMachineRecipes = false; public boolean mEnableAllMaterials = false; public boolean mEnableAllComponents = false; - public boolean mAddGTRecipesToIC2Machines = true; public boolean mEnableCleanroom = true; public boolean mLowGravProcessing = false; public boolean mAprilFool = false; @@ -219,8 +242,74 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean gt6Cable = true; public boolean ic2EnergySourceCompat = true; public boolean costlyCableConnection = false; + + /** + * This enables ambient-occlusion smooth lighting on tiles + */ + public boolean mRenderTileAmbientOcclusion = true; + + /** + * This enables rendering of glowing textures + */ + public boolean mRenderGlowTextures = true; + public static final int GUI_ID_COVER_SIDE_BASE = 10; // Takes GUI ID 10 - 15 + public static Map<String, Integer> oreDictBurnTimes = new HashMap<>(); + + // Locking + public static ReentrantLock TICK_LOCK = new ReentrantLock(); + + private final ConcurrentMap<UUID, GT_ClientPreference> mClientPrefernces = new ConcurrentHashMap<>(); + + static { + oreDictBurnTimes.put("dustTinyWood", 11); + oreDictBurnTimes.put("dustTinySodium", 44); + oreDictBurnTimes.put("dustSmallWood", 25); + oreDictBurnTimes.put("dustSmallSodium", 100); + oreDictBurnTimes.put("dustWood", 100); + oreDictBurnTimes.put("dustTinyCoal", 177); + oreDictBurnTimes.put("dustTinyCharcoal", 177); + oreDictBurnTimes.put("dustTinyLignite", 166); + oreDictBurnTimes.put("plateWood", 300); + oreDictBurnTimes.put("dustSmallLignite", 375); + oreDictBurnTimes.put("dustSodium", 400); + oreDictBurnTimes.put("dustSmallCoal", 400); + oreDictBurnTimes.put("dustSmallCharcoal", 400); + oreDictBurnTimes.put("dustTinyLithium", 888); + oreDictBurnTimes.put("dustTinyCaesium", 888); + oreDictBurnTimes.put("gemLignite", 1200); + oreDictBurnTimes.put("crushedLignite", 1200); + oreDictBurnTimes.put("dustImpureLignite", 1200); + oreDictBurnTimes.put("dustLignite", 1200); + oreDictBurnTimes.put("dustSulfur", 1600); + oreDictBurnTimes.put("gemCoal", 1600); + oreDictBurnTimes.put("crushedCoal", 1600); + oreDictBurnTimes.put("dustImpureCoal", 1600); + oreDictBurnTimes.put("dustCoal", 1600); + oreDictBurnTimes.put("gemCharcoal", 1600); + oreDictBurnTimes.put("crushedCharcoal", 1600); + oreDictBurnTimes.put("dustImpureCharcoal", 1600); + oreDictBurnTimes.put("dustCharcoal", 1600); + oreDictBurnTimes.put("dustSmallLithium", 2000); + oreDictBurnTimes.put("dustSmallCaesium", 2000); + oreDictBurnTimes.put("gemSodium", 4000); + oreDictBurnTimes.put("crushedSodium", 4000); + oreDictBurnTimes.put("dustImpureSodium", 4000); + oreDictBurnTimes.put("gemLithium", 6000); + oreDictBurnTimes.put("crushedLithium", 6000); + oreDictBurnTimes.put("dustImpureLithium", 6000); + oreDictBurnTimes.put("dustLithium", 6000); + oreDictBurnTimes.put("gemCaesium", 6000); + oreDictBurnTimes.put("crushedCaesium", 6000); + oreDictBurnTimes.put("dustImpureCaesium", 6000); + oreDictBurnTimes.put("dustCaesium", 6000); + oreDictBurnTimes.put("blockLignite", 12000); + oreDictBurnTimes.put("blockCharcoal", 16000); + } + + + public GT_Proxy() { GameRegistry.registerFuelHandler(this); MinecraftForge.EVENT_BUS.register(this); @@ -687,8 +776,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } aEvent.bow.damageItem(1, aEvent.entityPlayer); aEvent.bow.getItem(); - aEvent.entityPlayer.worldObj.playSoundAtEntity(aEvent.entityPlayer, "random.bow", 1.0F, 0.64893958288F + tSpeed - * 0.5F); + + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() + .setPitch(0.64893958288F + tSpeed * 0.5F) + .setVolume(1f) + .setIdentifier("random.bow") + .setEntity(aEvent.entityPlayer) + .setWorld(aEvent.entityPlayer.worldObj) + .run(); tArrowEntity.canBePickedUp = 1; if (!aEvent.entityPlayer.capabilities.isCreativeMode) { @@ -982,7 +1077,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { aMaterial.add(GT_Utility.copyAmount(1L, aEvent.Ore)); if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) && !aPrefix.isIgnored(aMaterial)) { - List<TC_AspectStack> tAspects = new ArrayList<TC_AspectStack>(); + List<TC_AspectStack> tAspects = new ArrayList<>(); for (TC_AspectStack tAspect : aPrefix.mAspects) tAspect.addToAspectList(tAspects); if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0) for (TC_AspectStack tAspect : aMaterial.mAspects) tAspect.addToAspectList(tAspects); GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name); @@ -1241,6 +1336,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void onServerTickEvent(TickEvent.ServerTickEvent aEvent) { + if (aEvent.side.isServer()) { + if (aEvent.phase == TickEvent.Phase.START) { + TICK_LOCK.lock(); + } else { + TICK_LOCK.unlock(); + } + } + } @SubscribeEvent @@ -1282,8 +1385,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { Class tClass = tEntity.getClass(); int tEntityCount = 1; if (tList != null) { - for (int j = 0; j < tList.size(); j++) { - if ((tList.get(j) != null) && (tList.get(j).getClass() == tClass)) { + for (Object o : tList) { + if ((o != null) && (o.getClass() == tClass)) { tEntityCount++; } } @@ -1493,35 +1596,22 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } + public GT_ClientPreference getClientPreference(UUID aPlayerID) { + return mClientPrefernces.get(aPlayerID); + } + + public void setClientPreference(UUID aPlayerID, GT_ClientPreference aPreference) { + mClientPrefernces.put(aPlayerID, aPreference); + } + + @Override public Object getServerGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { if(aID>=1000){ int ID = aID-1000; - switch(ID){ - case 0: - return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())); - case 1: - return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())); - case 2: - return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())); - case 10: - return new GT_ContainerVolumetricFlask(aPlayer.inventory); - default: - return getRightItem(aPlayer, ID); + if (ID == 10) { + return new GT_ContainerVolumetricFlask(aPlayer.inventory); } - } - if(aID>=100){ - int tSlot = aID / 100; - int ID = aID%100; - switch(ID){ - case 0: - return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); - case 1: - return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); - case 2: - return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); - default: - return getRightItem(aPlayer, ID); - } + return null; } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { @@ -1536,52 +1626,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return null; } - public Object getRightItem(EntityPlayer player, int ID){ - ItemStack mStack = player.getEquipmentInSlot(ID/100); - if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null; - - switch(ID % 100){ - case 0: - return new ContainerBasicArmor(player, new InventoryArmor(ModularArmor_Item.class, mStack)); - case 1: - return new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)); - case 2: - return new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)); - } - return null; - - } - @Override public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { if(aID>=1000){ int ID = aID-1000; - switch(ID){ - case 0: - return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer); - case 1: - return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer); - case 2: - return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer); - case 10: - return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory)); - default: - return getRightItemGui(aPlayer, ID); + if (ID == 10) { + return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory)); } - } - if(aID>=100){ - int tSlot = aID / 100; - int ID = aID%100; - switch(ID){ - case 0: - return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); - case 1: - return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); - case 2: - return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); - default: - return getRightItem(aPlayer, ID); - } + return null; } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { @@ -1604,139 +1656,45 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return null; } - public Object getRightItemGui(EntityPlayer player, int ID){ - ItemStack mStack = player.getEquipmentInSlot(ID/100); - if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null; - - switch(ID % 100){ - case 0: - return new GuiModularArmor(new ContainerBasicArmor(player, new InventoryArmor(ModularArmor_Item.class, mStack)),player); - case 1: - return new GuiElectricArmor1(new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)), player); - case 2: - return new GuiElectricArmor1(new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)), player); - } - return null; + private static List<String> getOreDictNames(ItemStack stack) { + return Arrays.stream(OreDictionary.getOreIDs(stack)).mapToObj(OreDictionary::getOreName).collect(Collectors.toList()); + } - } + @Override public int getBurnTime(ItemStack aFuel) { if ((aFuel == null) || (aFuel.getItem() == null)) { return 0; } int rFuelValue = 0; if ((aFuel.getItem() instanceof GT_MetaGenerated_Item)) { - Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get(Short.valueOf((short) aFuel.getItemDamage())); + Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get((short) aFuel.getItemDamage()); if (tFuelValue != null) { - rFuelValue = Math.max(rFuelValue, tFuelValue.shortValue()); + rFuelValue = Math.max(rFuelValue, tFuelValue); } } NBTTagCompound tNBT = aFuel.getTagCompound(); if (tNBT != null) { + // See if we have something defined by NBT short tValue = tNBT.getShort("GT.ItemFuelValue"); rFuelValue = Math.max(rFuelValue, tValue); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemSodium")) { - rFuelValue = Math.max(rFuelValue, 4000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) { - rFuelValue = Math.max(rFuelValue, 4000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) { - rFuelValue = Math.max(rFuelValue, 4000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) { - rFuelValue = Math.max(rFuelValue, 400); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) { - rFuelValue = Math.max(rFuelValue, 100); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) { - rFuelValue = Math.max(rFuelValue, 44); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSulfur")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) { - rFuelValue = Math.max(rFuelValue, 2000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) { - rFuelValue = Math.max(rFuelValue, 888); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) { - rFuelValue = Math.max(rFuelValue, 6000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) { - rFuelValue = Math.max(rFuelValue, 2000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) { - rFuelValue = Math.max(rFuelValue, 888); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) { - rFuelValue = Math.max(rFuelValue, 1200); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) { - rFuelValue = Math.max(rFuelValue, 1200); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) { - rFuelValue = Math.max(rFuelValue, 1200); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) { - rFuelValue = Math.max(rFuelValue, 1200); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) { - rFuelValue = Math.max(rFuelValue, 375); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) { - rFuelValue = Math.max(rFuelValue, 166); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) { - rFuelValue = Math.max(rFuelValue, 400); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) { - rFuelValue = Math.max(rFuelValue, 177); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) { - rFuelValue = Math.max(rFuelValue, 400); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) { - rFuelValue = Math.max(rFuelValue, 177); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) { - rFuelValue = Math.max(rFuelValue, 100); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) { - rFuelValue = Math.max(rFuelValue, 25); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) { - rFuelValue = Math.max(rFuelValue, 11); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) { - rFuelValue = Math.min(rFuelValue, 300); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) { - rFuelValue = Math.max(rFuelValue, 12000); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) { - rFuelValue = Math.max(rFuelValue, 16000); - } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) { - rFuelValue = Math.max(rFuelValue, 150); - } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) { - rFuelValue = Math.max(rFuelValue, 100); - } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) { - rFuelValue = Math.max(rFuelValue, 600); - } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) { - rFuelValue = Math.max(rFuelValue, 600); - } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) { - rFuelValue = Math.max(rFuelValue, 150000); - } - if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) { - rFuelValue = Math.max(rFuelValue, 100000); + } else { + // If not check the ore dict + rFuelValue = Math.max(rFuelValue, getOreDictNames(aFuel).stream().mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)).max().orElse(0)); } - - return rFuelValue; + + // If we have something from the GT MetaGenerated_Item, ItemFuelValue, or OreDict return + if (rFuelValue > 0) return rFuelValue; + + // Otherwise a few more checks + if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) return 150; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) return 100; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) return 600; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) return 600; + else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) return 150000; + else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) return 100000; + + return 0; } public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){ @@ -1954,6 +1912,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public void activateOreDictHandler() { this.mOreDictActivated = true; ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", mEvents.size()); + if (Loader.isModLoaded("betterloadingscreen")){ GT_Values.cls_enabled = true; try { @@ -1964,6 +1923,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } else GT_Proxy.stepMaterialsVanilla(this.mEvents,progressBar); + } public static final HashMap<Integer,HashMap<ChunkCoordIntPair,int []>> dimensionWiseChunkData = new HashMap<>(16);//stores chunk data that is loaded/saved @@ -2002,11 +1962,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void handleChunkLoadEvent(ChunkDataEvent.Load event) { final int worldID=event.world.provider.dimensionId; - HashMap<ChunkCoordIntPair, int[]> chunkData = dimensionWiseChunkData.get(worldID); - if (chunkData == null){ - chunkData=new HashMap<>(1024); - dimensionWiseChunkData.put(worldID, chunkData); - } + HashMap<ChunkCoordIntPair, int[]> chunkData = dimensionWiseChunkData.computeIfAbsent(worldID, k -> new HashMap<>(1024)); if (dimensionWisePollution.get(worldID) == null) dimensionWisePollution.put(worldID, new GT_Pollution(event.world)); diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 96c1374059..0e421843a9 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -33,6 +33,7 @@ import static gregtech.GT_Mod.GT_FML_LOGGER; public class GT_RecipeAdder implements IGT_RecipeAdder { + @Override @Deprecated public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) { return false; @@ -50,18 +51,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, 5); } + @Override public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt); } + @Override public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { return addCentrifugeRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, aChances, aDuration, aEUt, false); } + @Override public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; @@ -79,6 +84,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -90,10 +96,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { return addElectrolyzerRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt); } + @Override public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; @@ -108,28 +116,35 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration) { return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration); } + @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt) { return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration, aEUt); } + @Override 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) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30); } + @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, GT_Values.NI, aDuration, aEUTick); } + @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, aEUtick, false); } + @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; @@ -154,6 +169,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick){ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) { return false; @@ -165,6 +181,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; @@ -198,10 +215,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } + @Override public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { return addBlastRecipe(aInput1, aInput2, null, null, aOutput1, aOutput2, aDuration, aEUt, aLevel); } + @Override public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -214,6 +233,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration) { if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { return false; @@ -249,6 +269,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -265,6 +286,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false); } + @Override 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; @@ -282,6 +304,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override @Deprecated public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { @@ -293,6 +316,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -315,6 +339,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe(aInput,null,aOutput1,aOutput2,aDuration,aEUt,aCleanroom); } @@ -325,14 +350,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addCutterRecipe(aInput,GT_Utility.getIntegratedCircuit(aCircuit),aOutput1,aOutput2,aDuration,aEUt,aCleanroom); } + @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { return addCutterRecipe(aInput, aOutput1, aOutput2, aDuration, aEUt,false); } + @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt,false); } + @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe(new ItemStack[]{aInput,aCircuit},new ItemStack[]{aOutput1,aOutput2},aDuration,aEUt,aCleanroom ? -200 : 0); } @@ -341,6 +369,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addCutterRecipe(aInputs, aOutputs, aDuration, aEUt, aCleanroom ? -200 : 0); } + @Override public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, int aSpecial) { if ((aInputs == null) || (aOutputs == null) || aInputs.length == 0 || aOutputs.length == 0) { return false; @@ -358,16 +387,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } - public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict,int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt){ - for(ItemStack tStack : GT_OreDictUnificator.getOres(aOreDict)){ + @Override + public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt){ + for(ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)){ if(GT_Utility.isStackValid(tStack)) addAssemblerRecipe(aInput1, GT_Utility.copyAmount(aAmount, tStack), aFluidInput, aOutput1, aDuration, aEUt); } return true; } + @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt){ - for(ItemStack tStack : GT_OreDictUnificator.getOres(aOreDict)){ + for(ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)){ if(GT_Utility.isStackValid(tStack)) { ItemStack[] extendedInputs = new ItemStack[aInputs.length + 1]; System.arraycopy(aInputs, 0, extendedInputs, 0, aInputs.length); @@ -378,44 +409,29 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { - /*if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { - return false; - } - GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); - return true; - */ return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, null,aOutput1, aDuration, aEUt, false); } + @Override public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt); } + @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { - /*if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { - return false; - } - if (aOutput1 == null) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { - return false; - } - GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); - */ 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) { if(aInput2==null) return addAssemblerRecipe(new ItemStack[]{aInput1},aFluidInput,aOutput1,aDuration,aEUt,aCleanroom); return addAssemblerRecipe(new ItemStack[]{aInput1,aInput2},aFluidInput,aOutput1,aDuration,aEUt,aCleanroom); } + @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) { if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { @@ -450,7 +466,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int oreID : OreDictionary.getOreIDs(aInputs[i])) { String odName = OreDictionary.getOreName(oreID); if (odName.contains("circuit")) { - for (ItemStack tStack : GT_OreDictUnificator.getOres(odName)) { + for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(odName)) { if (!GT_Utility.isStackValid(tStack)) continue; aInputs[i] = new ItemStack(tStack.getItem(),aInputs[i].stackSize,tStack.getItemDamage()); @@ -491,6 +507,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } + @Override public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; @@ -502,6 +519,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addPolarizerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; @@ -513,6 +531,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addBenderRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -524,6 +543,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addExtruderRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aShape == null) || (aOutput == null)) { return false; @@ -535,6 +555,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aShape == null) || (aOutput == null)) { return false; @@ -546,6 +567,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt) { if ((aInput == null) || (aFluidInput == null) || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; @@ -557,6 +579,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -582,16 +605,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override @Deprecated public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { -// if ((aInput1 == null) || (aOutput1 == null)) { -// return false; -// } -// if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput1, aDuration)) <= 0) { -// return false; -// } -// new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2, aOutput3, aOutput4, aDuration, aEUt); -// return true; return false; } @@ -605,6 +621,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addDistillationTowerRecipe(aInput, aOutputs, aOutput2, aDuration, aEUt); } + @Override 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; @@ -616,6 +633,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } + @Override public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -627,6 +645,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -638,11 +657,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override @Deprecated public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4) { return false; } + @Override public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType) { if (aInput1 == null) { return false; @@ -651,6 +672,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addSonictronSound(ItemStack aItemStack, String aSoundName) { if ((aItemStack == null) || (aSoundName == null) || (aSoundName.equals(""))) { return false; @@ -665,6 +687,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -676,6 +699,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt) { if ((aContainedItem == null) || (aFullBox == null)) { return false; @@ -687,6 +711,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt) { if ((aFullBox == null) || (aContainedItem == null)) { return false; @@ -698,6 +723,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; @@ -709,6 +735,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted) { if ((aAmplifierItem == null) || (aAmplifierAmountOutputted <= 0)) { return false; @@ -720,6 +747,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { return false; @@ -734,10 +762,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden) { return addBrewingRecipe(aIngredient, aInput, aOutput, 128, 4, aHidden); } + @Override public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; @@ -752,6 +782,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; @@ -766,10 +797,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden) { return addFermentingRecipe(aInput, aOutput, aDuration, 2, aHidden); } + @Override public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; @@ -815,18 +848,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe(aCircuit, aInput, aOutput, null, aDuration, aEUt, aHidden); } + @Override public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aSolidOutput, aDuration, aEUt, aHidden); } + @Override public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aDuration, aEUt, aHidden); } + @Override public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aMold == null) || (aInput == null) || (aOutput == null)) { return false; @@ -849,6 +886,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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) { if ((aInput == null) || (aOutput == null)) { return false; @@ -869,6 +907,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; @@ -886,13 +925,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override 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)) { - if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { - } - } else { + if (aInput == null || aOutput == null) { return false; } if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { @@ -905,11 +942,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) { - if ((aInput != null) && (aOutput != null)) { - if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { - } - } else { + if (aInput == null || aOutput == null) { return false; } if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { @@ -922,6 +957,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override 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; @@ -933,6 +969,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; @@ -944,6 +981,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; @@ -955,6 +993,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; @@ -966,10 +1005,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { return addAutoclaveRecipe(aInput, aFluid, aOutput,aChance, aDuration, aEUt); } + @Override 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); } @@ -978,8 +1019,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addAutoclaveRecipe(aInput, aCircuit, aFluid, aOutput, aChance, aDuration, aEUt, false); } - public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { - if ((aInput == null) || (aFluid == null) || (aOutput == null)) { + @Override + public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + return addAutoclaveRecipe(aInput, aCircuit, aFluidIn, null, aOutput, aChance, aDuration, aEUt,aCleanroom); + } + + @Override + public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + if ((aInput == null) || (aFluidIn == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { @@ -988,14 +1035,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (!GT_Mod.gregtechproxy.mEnableCleanroom){ aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidIn}, new FluidStack[]{aFluidOut}, aDuration, aEUt, aCleanroom ? -200 : 0); return true; } + @Override public boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, aCleanroom); } + @Override public boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; @@ -1010,15 +1059,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, null, null, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt); } + @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt); } - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8,ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { + @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) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { return false; } @@ -1032,10 +1084,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); } + @Override public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom) { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; @@ -1050,6 +1104,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { return false; @@ -1061,6 +1116,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; @@ -1072,6 +1128,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt) { if ((aItemToSift == null) || (aSiftedItems == null)) { return false; @@ -1093,7 +1150,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } - public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { + @Override + public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; } @@ -1121,6 +1179,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } + @Override public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; @@ -1137,6 +1196,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } + @Override public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; @@ -1153,6 +1213,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } + @Override 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; @@ -1174,6 +1235,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addPulveriserRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } + @Override public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; @@ -1208,16 +1270,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override @Deprecated public boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) { - //if ((aInput == null) || (aOutput == null)) { - // return false; - // } - // if ((aDuration = GregTech_API.sRecipeFile.get("cracking", aInput.getUnlocalizedName(), aDuration)) <= 0) { - // return false; - // } - // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); - // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, GT_ModHandler.getSteam(aInput.amount)}, new FluidStack[]{aOutput, Materials.Hydrogen.getGas(aInput.amount)}, aDuration, aEUt, 0); - // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, Materials.Hydrogen.getGas(aInput.amount)}, new FluidStack[]{new FluidStack(aOutput.getFluid(), (int) (aOutput.amount * 1.3))}, aDuration, aEUt, 0); - // return true; return false; } @@ -1309,6 +1361,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addCircuitAssemblerRecipe(aInputs, aFluidInput, aOutput,aDuration,aEUt, false); } + @Override public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom) { if (this.areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { @@ -1339,7 +1392,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int oreID : OreDictionary.getOreIDs(aInputs[i])) { String odName = OreDictionary.getOreName(oreID); if (odName.contains("circuit")) { - for (ItemStack tStack : GT_OreDictUnificator.getOres(odName)) { + for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(odName)) { if (!GT_Utility.isStackValid(tStack)) continue; aInputs[i] = new ItemStack(tStack.getItem(),aInputs[i].stackSize,tStack.getItemDamage()); diff --git a/src/main/java/gregtech/common/GT_Server.java b/src/main/java/gregtech/common/GT_Server.java index 831ec4666a..51bf9e898b 100644 --- a/src/main/java/gregtech/common/GT_Server.java +++ b/src/main/java/gregtech/common/GT_Server.java @@ -4,27 +4,32 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class GT_Server - extends GT_Proxy { +public class GT_Server extends GT_Proxy { + @Override public boolean isServerSide() { return true; } + @Override public boolean isClientSide() { return false; } + @Override public boolean isBukkitSide() { return false; } + @Override public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { } + @Override public int addArmor(String aPrefix) { return 0; } + @Override public EntityPlayer getThePlayer() { return null; } diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index aa3d120357..bc6372e41c 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -27,8 +27,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -public class GT_ThaumcraftCompat - implements IThaumcraftCompat { +public class GT_ThaumcraftCompat implements IThaumcraftCompat { public GT_ThaumcraftCompat() { TC_Aspects.AER.mAspect = Aspect.AIR; TC_Aspects.ALIENIS.mAspect = Aspect.ELDRITCH; @@ -102,6 +101,7 @@ public class GT_ThaumcraftCompat 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) { if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { return null; @@ -177,6 +177,7 @@ public class GT_ThaumcraftCompat return rResearch.registerResearchItem(); } + @Override public Object addCrucibleRecipe(String aResearch, Object aInput, ItemStack aOutput, List<TC_Aspects.TC_AspectStack> aAspects) { if ((GT_Utility.isStringInvalid(aResearch)) || (aInput == null) || (aOutput == null) || (aAspects == null) || (aAspects.isEmpty())) { return null; @@ -184,6 +185,7 @@ public class GT_ThaumcraftCompat return ThaumcraftApi.addCrucibleRecipe(aResearch, GT_Utility.copy(new Object[]{aOutput}), ((aInput instanceof ItemStack)) || ((aInput instanceof ArrayList)) ? aInput : aInput.toString(), getAspectList(aAspects)); } + @Override public Object addInfusionRecipe(String aResearch, ItemStack aMainInput, ItemStack[] aSideInputs, ItemStack aOutput, int aInstability, List<TC_Aspects.TC_AspectStack> aAspects) { if ((GT_Utility.isStringInvalid(aResearch)) || (aMainInput == null) || (aSideInputs == null) || (aOutput == null) || (aAspects == null) || (aAspects.isEmpty())) { return null; @@ -191,13 +193,15 @@ public class GT_ThaumcraftCompat return ThaumcraftApi.addInfusionCraftingRecipe(aResearch, GT_Utility.copy(new Object[]{aOutput}), aInstability, getAspectList(aAspects), aMainInput, aSideInputs); } - public boolean registerThaumcraftAspectsToItem(ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) { + @Override + public boolean registerThaumcraftAspectsToItem(ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) { if (aAspects.isEmpty()) return false; ThaumcraftApi.registerObjectTag(aOreDict, (AspectList)getAspectList(aAspects)); return true; } - public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_Aspects.TC_AspectStack> aAspects, boolean aAdditive) { + @Override + public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_Aspects.TC_AspectStack> aAspects, boolean aAdditive) { if (aAspects.isEmpty()) return false; if (aAdditive) { ThaumcraftApi.registerComplexObjectTag(aStack, (AspectList)getAspectList(aAspects)); @@ -210,6 +214,7 @@ public class GT_ThaumcraftCompat return true; } + @Override public boolean registerPortholeBlacklistedBlock(Block aBlock) { ThaumcraftApi.portableHoleBlackList.add(aBlock); return true; 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 995984158f..214661ae67 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 @@ -18,8 +18,7 @@ import static gregtech.api.enums.GT_Values.debugOrevein; import static gregtech.api.enums.GT_Values.oreveinPlacerOres; import static gregtech.api.enums.GT_Values.oreveinPlacerOresMultiplier; -public class GT_Worldgen_GT_Ore_Layer - extends GT_Worldgen { +public 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; @@ -77,21 +76,8 @@ public class GT_Worldgen_GT_Ore_Layer this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic)); this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); - if (this.mEnabled) { - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); sWeight += this.mWeight; - //if(GregTech_API.mImmersiveEngineering && GT_Mod.gregtechproxy.mImmersiveEngineeringRecipes){ - // blusunrize.immersiveengineering.api.tool.ExcavatorHandler.addMineral(aName.substring(8, 9).toUpperCase()+aName.substring(9), aWeight, 0.2f, new String[]{"ore"+aPrimary.mName,"ore"+aSecondary.mName,"ore"+aBetween.mName,"ore"+aSporadic.mName}, new float[]{.4f,.4f,.15f,.05f}); - //} - } } @@ -106,9 +92,6 @@ public class GT_Worldgen_GT_Ore_Layer this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd); - //this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - //this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - //this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); short mMaxY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)); if (mMaxY < (this.mMinY + 9)) { @@ -128,24 +111,12 @@ public class GT_Worldgen_GT_Ore_Layer 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 (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); - if (this.mEnabled) { - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); sWeight += this.mWeight; - //if(GregTech_API.mImmersiveEngineering && GT_Mod.gregtechproxy.mImmersiveEngineeringRecipes){ - // blusunrize.immersiveengineering.api.tool.ExcavatorHandler.addMineral(aName.substring(8, 9).toUpperCase()+aName.substring(9), aWeight, 0.2f, new String[]{"ore"+aPrimary.mName,"ore"+aSecondary.mName,"ore"+aBetween.mName,"ore"+aSporadic.mName}, new float[]{.4f,.4f,.15f,.05f}); - //} - } } + @Override public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if( mWorldGenName.equals("NoOresInVein") ) { if (debugOrevein) GT_Log.out.println( @@ -234,7 +205,7 @@ public class GT_Worldgen_GT_Ore_Layer // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). int localDensity = Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))) ); - // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop + // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop // Now we do bottom-level-first oregen, and work our way upwards. // Layer -1 Secondary and Sporadic int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. 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 85c0eb2d07..2e17873980 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 @@ -27,7 +27,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces public final String aTextWorldgen = "worldgen."; public static ArrayList<GT_Worldgen_GT_Ore_SmallPieces> sList = new ArrayList<GT_Worldgen_GT_Ore_SmallPieces>(); - //TODO CHECk IF INSTANTIATION IS CORRECT + //TODO CHECK IF INSTANTIATION IS CORRECT public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); @@ -38,7 +38,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces 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"); - this.sList.add(this); + 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) { @@ -51,11 +51,12 @@ public class GT_Worldgen_GT_Ore_SmallPieces 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"); - this.sList.add(this); + sList.add(this); } - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + @Override + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) { return false; //Not the correct biome for ore mix } diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java index a354a813fe..d4992c3c16 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -19,8 +19,7 @@ import java.util.Random; import static gregtech.api.enums.GT_Values.debugStones; -public class GT_Worldgen_Stone - extends GT_Worldgen_Ore { +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. @@ -46,6 +45,7 @@ public class GT_Worldgen_Stone super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); } + @Override public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { XSTR stoneRNG = new XSTR(); ArrayList<ValidSeeds> stones = new ArrayList(); diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 00bdb0d879..0911f257b4 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -1,17 +1,5 @@ package gregtech.common; -import static gregtech.api.enums.GT_Values.debugOrevein; -import static gregtech.api.enums.GT_Values.debugWorldGen; -import static gregtech.api.enums.GT_Values.oreveinAttempts; -import static gregtech.api.enums.GT_Values.oreveinMaxPlacementAttempts; -import static gregtech.api.enums.GT_Values.oreveinPercentage; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.List; -import java.util.Random; - import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; @@ -26,18 +14,23 @@ import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkProvider; -// Disabled for hardcoded value. import static gregtech.api.enums.GT_Values.oreveinMaxSize; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.List; +import java.util.Random; + +import static gregtech.api.enums.GT_Values.debugOrevein; +import static gregtech.api.enums.GT_Values.debugWorldGen; +import static gregtech.api.enums.GT_Values.oreveinAttempts; +import static gregtech.api.enums.GT_Values.oreveinMaxPlacementAttempts; +import static gregtech.api.enums.GT_Values.oreveinPercentage; -public class GT_Worldgenerator -implements IWorldGenerator { - //public static boolean sAsteroids = true; +public class GT_Worldgenerator implements IWorldGenerator { private static int mEndAsteroidProbability = 300; - //private static int mGCAsteroidProbability = 50; private static int mSize = 100; private static int endMinSize = 50; private static int endMaxSize = 200; - //private static int gcMinSize = 100; - //private static int gcMaxSize = 400; private static boolean endAsteroids = true; public static List<Runnable> mList = new ArrayList(); public static HashSet<Long> ProcChunks = new HashSet<Long>(); @@ -46,7 +39,6 @@ implements IWorldGenerator { public static Hashtable<Long, GT_Worldgen_GT_Ore_Layer> validOreveins = new Hashtable(1024); public boolean mIsGenerating = false; public static final Object listLock = new Object(); - //private static boolean gcAsteroids = true; public GT_Worldgenerator() { @@ -54,10 +46,6 @@ implements IWorldGenerator { endMinSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMinSize", 50); endMaxSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMaxSize", 200); mEndAsteroidProbability = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidProbability", 300); - //gcAsteroids = GregTech_API.sWorldgenFile.get("gcasteroids", "GenerateGCAsteroids", true); - //gcMinSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMinSize", 100); - //gcMaxSize = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidMaxSize", 400); - //mGCAsteroidProbability = GregTech_API.sWorldgenFile.get("gcasteroids", "GCAsteroidProbability", 300); GameRegistry.registerWorldGenerator(this, 1073741823); if (debugWorldGen) { GT_Log.out.println( @@ -66,36 +54,37 @@ implements IWorldGenerator { } } + @Override public void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { synchronized (listLock) { - this.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)); + 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: " + this.mList.size() + " SIZE: " + mList.size() ); } if (!this.mIsGenerating) { this.mIsGenerating = true; - int mList_sS=this.mList.size(); + int mList_sS= mList.size(); mList_sS = Math.min(mList_sS, 5); // Run a maximum of 5 chunks at a time through worldgen. Extra chunks get done later. for (int i = 0; i < mList_sS; i++) { - WorldGenContainer toRun = (WorldGenContainer) this.mList.get(0); + 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: " + this.mList.size() + + " SIZE: " + mList.size() + " i: " + i ); synchronized (listLock) { - this.mList.remove(0); + mList.remove(0); } toRun.run(); } @@ -339,6 +328,7 @@ implements IWorldGenerator { } } + @Override public void run() { long startTime = System.nanoTime(); int oreveinMaxSize; @@ -480,16 +470,7 @@ implements IWorldGenerator { } else if (ranOre < 10) { GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, sporadicMeta, false); } else { - //if (tDimensionType == 1) {//TODO CHECK mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0); - //} else if (tDimensionName.equals("Asteroids")) { - ////int asteroidType = aRandom.nextInt(20); - ////if (asteroidType == 19) { //Rare Asteroid? - ////mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3); - ////} else { - //mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3); - ////} - //} } } } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index e1db4c2ac0..4a47bfa46e 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -23,6 +23,7 @@ public class GT_AlleleHelper extends AlleleHelper { private Map<Class<?>, Map<?, ? extends IAllele>> alleleMaps = new HashMap<>(); + @Override public void init() { if (PluginManager.Module.APICULTURE.isEnabled()) { createAlleles(EnumAllele.Fertility.class, EnumBeeChromosome.FERTILITY); 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 ca919e7cf2..b088f724f5 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -76,4 +76,4 @@ public class GT_Bee_Mutation extends BeeMutation { } return mutationChance; } -}
\ No newline at end of file +} 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 eb7c399eb0..2f8e248117 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -2,14 +2,13 @@ package gregtech.common.blocks; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; 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_Casings1 - extends GT_Block_Casings_Abstract { +public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { /** * Texture Index Information @@ -28,8 +27,8 @@ public class GT_Block_Casings1 public GT_Block_Casings1() { super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - Textures.BlockIcons.casingTexturePages[0][i] = new GT_CopiedBlockTexture(this, 6, i); + for (int i = 0; i < 16; i++) { + Textures.BlockIcons.casingTexturePages[0][i] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing"); @@ -66,6 +65,7 @@ public class GT_Block_Casings1 ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15)); } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { @@ -93,6 +93,7 @@ public class GT_Block_Casings1 return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } + @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } 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 6da2195921..f4f478b7be 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -3,7 +3,7 @@ package gregtech.common.blocks; import gregtech.api.enums.Dyes; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import net.minecraft.block.Block; import net.minecraft.entity.Entity; @@ -11,18 +11,18 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; -public class GT_Block_Casings2 - extends GT_Block_Casings_Abstract { +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); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i != 6){ - Textures.BlockIcons.casingTexturePages[0][(i + 16)] = new GT_CopiedBlockTexture(this, 6, i); - } - } + for (int i = 0; i < 16; i++) { + if (i != 6) { + Textures.BlockIcons.casingTexturePages[0][(i + 16)] = TextureFactory.of(this, i); + } + } //Special handler for Pyrolyse Oven Casing on hatches... - Textures.BlockIcons.casingTexturePages[0][22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa); + Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 0, ForgeDirection.UNKNOWN, Dyes.MACHINE_METAL.mRGBa); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -59,6 +59,7 @@ public class GT_Block_Casings2 } + @Override public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { case 0: @@ -97,6 +98,7 @@ public class GT_Block_Casings2 return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } + @Override public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); } 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 fde793522a..81be342822 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -2,17 +2,16 @@ package gregtech.common.blocks; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; 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 class GT_Block_Casings3 extends GT_Block_Casings_Abstract { public GT_Block_Casings3() { super(GT_Item_Casings3.class, "gt.blockcasings3", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - Textures.BlockIcons.casingTexturePages[0][(i + 32)] = new GT_CopiedBlockTexture(this, 6, i); + Textures.BlockIcons.casingTexturePages[0][(i + 32)] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Yellow Stripes Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Yellow Stripes Block"); @@ -48,6 +47,7 @@ public class GT_Block_Casings3 ItemList.Casing_Firebox_TungstenSteel.set(new ItemStack(this, 1, 15)); } + @Override public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { case 0: 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 0dbf5e9f54..6fb40784c1 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -6,7 +6,7 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; import net.minecraft.item.ItemStack; @@ -14,14 +14,13 @@ 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 { +public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public static boolean mConnectedMachineTextures = true; public GT_Block_Casings4() { super(GT_Item_Casings4.class, "gt.blockcasings4", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - Textures.BlockIcons.casingTexturePages[0][(i + 48)] = new GT_CopiedBlockTexture(this, 6, i); + Textures.BlockIcons.casingTexturePages[0][(i + 48)] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing"); @@ -56,6 +55,7 @@ public class GT_Block_Casings4 ItemList.Casing_Firebricks.set(new ItemStack(this, 1, 15)); } + @Override public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { case 0: @@ -111,6 +111,7 @@ public class GT_Block_Casings4 } } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); 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 55492c961c..296bf765b0 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java @@ -2,20 +2,25 @@ package gregtech.common.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.interfaces.IHeatingCoil; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -public class GT_Block_Casings5 - extends GT_Block_Casings_Abstract { +import java.util.function.Consumer; + +import static gregtech.api.enums.HeatingCoilLevel.*; + +public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHeatingCoil { + public GT_Block_Casings5() { super(GT_Item_Casings5.class, "gt.blockcasings5", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - Textures.BlockIcons.casingTexturePages[1][i] = new GT_CopiedBlockTexture(this, 6, i); + Textures.BlockIcons.casingTexturePages[1][i] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Cupronickel Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Kanthal Coil Block"); @@ -26,6 +31,8 @@ public class GT_Block_Casings5 GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Naquadah Alloy Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Electrum Flux Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Awakened Draconium Coil Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "HSS-S Coil Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Trinium Coil Block"); ItemList.Casing_Coil_Cupronickel.set(new ItemStack(this, 1, 0)); ItemList.Casing_Coil_Kanthal.set(new ItemStack(this, 1, 1)); @@ -36,7 +43,10 @@ public class GT_Block_Casings5 ItemList.Casing_Coil_NaquadahAlloy.set(new ItemStack(this, 1, 6)); ItemList.Casing_Coil_ElectrumFlux.set(new ItemStack(this, 1, 7)); ItemList.Casing_Coil_AwakenedDraconium.set(new ItemStack(this, 1, 8)); + ItemList.Casing_Coil_HSSS.set(new ItemStack(this, 1, 9)); + ItemList.Casing_Coil_Trinium.set(new ItemStack(this, 1, 10)); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int aSide, int aMeta) { @@ -59,7 +69,62 @@ public class GT_Block_Casings5 return Textures.BlockIcons.MACHINE_COIL_ELECTRUMFLUX.getIcon(); case 8: return Textures.BlockIcons.MACHINE_COIL_AWAKENEDDRACONIUM.getIcon(); + case 9: + return Textures.BlockIcons.MACHINE_COIL_HSSS.getIcon(); + case 10: + return Textures.BlockIcons.MACHINE_COIL_TRINIUM.getIcon(); } return Textures.BlockIcons.MACHINE_COIL_CUPRONICKEL.getIcon(); } + + /*--------------- COIL CHECK IMPL. ------------*/ + + public static HeatingCoilLevel getCoilHeatFromDamage(int meta) { + switch (meta) { + case 0: + return LV; + case 1: + return MV; + case 2: + return HV; + case 3: + return EV; + case 4: + return IV; + case 5: + return ZPM; + case 6: + return UV; + case 7: + return UEV; + case 8: + return UIV; + case 9: + return LuV; + case 10: + return UHV; + default: + return None; + } + } + + @Override + public HeatingCoilLevel getCoilHeat(int meta) { + getOnCoilCheck().accept(this); + return getCoilHeatFromDamage(meta); + } + + /*--------------- CALLBACK ------------*/ + + private Consumer<IHeatingCoil> callback = coil -> {}; + + @Override + public void setOnCoilCheck(Consumer<IHeatingCoil> callback) { + this.callback = callback; + } + + @Override + public Consumer<IHeatingCoil> getOnCoilCheck() { + return this.callback; + } } 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 d7e8ad23f0..96b7890fd7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -4,18 +4,17 @@ 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.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; 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 class GT_Block_Casings6 extends GT_Block_Casings_Abstract { public GT_Block_Casings6() { super(GT_Item_Casings6.class, "gt.blockcasings6", GT_Material_Casings.INSTANCE); for (int i = 0; i < 16; i = (i + 1)) { - Textures.BlockIcons.casingTexturePages[8][i + 112] = new GT_CopiedBlockTexture(this, 6, i); + Textures.BlockIcons.casingTexturePages[8][i + 112] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Hermetic Casing"); @@ -97,6 +96,7 @@ public class GT_Block_Casings6 } } + @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } 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 0f3aac4518..bb151afafa 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -4,19 +4,18 @@ 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.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -public class GT_Block_Casings8 - extends GT_Block_Casings_Abstract { +public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { //WATCH OUT FOR TEXTURE ID's public GT_Block_Casings8() { super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE); for (int i = 0; i < 5; i = (i + 1)) { - Textures.BlockIcons.casingTexturePages[1][i+48] = new GT_CopiedBlockTexture(this, 6, i); + Textures.BlockIcons.casingTexturePages[1][i+48] = TextureFactory.of(this, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "PTFE Pipe Casing"); 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 830a407777..49f15e328c 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 @@ -22,8 +22,7 @@ import net.minecraft.world.World; import java.util.List; import java.util.Random; -public abstract class GT_Block_Casings_Abstract - extends GT_Generic_Block { +public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block { public GT_Block_Casings_Abstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { super(aItemClass, aName, aMaterial); setStepSound(soundTypeMetal); @@ -32,86 +31,106 @@ public abstract class GT_Block_Casings_Abstract GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); } + @Override public String getHarvestTool(int aMeta) { return "wrench"; } + @Override public int getHarvestLevel(int aMeta) { return 2; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); } + @Override public float getExplosionResistance(Entity aTNT) { return Blocks.iron_block.getExplosionResistance(aTNT); } + @Override protected boolean canSilkHarvest() { return false; } + @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } + @Override public String getUnlocalizedName() { return this.mUnlocalizedName; } + @Override public String getLocalizedName() { return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return true; } + @Override public boolean renderAsNormalBlock() { return true; } + @Override public boolean isOpaqueCube() { return true; } + @Override public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } + @Override public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { return false; } + @Override public int damageDropped(int par1) { return par1; } + @Override public int getDamageValue(World par1World, int par2, int par3, int par4) { return par1World.getBlockMetadata(par2, par3, par4); } + @Override public int quantityDropped(Random par1Random) { return 1; } + @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister aIconRegister) { } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; 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 7bd4398ed7..0c98bab9c0 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -11,8 +11,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class GT_Block_Concretes - extends GT_Block_Stones_Abstract implements IBlockOnWalkOver{ +public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlockOnWalkOver{ public GT_Block_Concretes() { super(GT_Item_Concretes.class, "gt.blockconcretes"); setResistance(20.0F); @@ -51,14 +50,17 @@ public class GT_Block_Concretes GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Concrete, new ItemStack(this, 1, 15)); } + @Override public int getHarvestLevel(int aMeta) { return 1; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ); } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { return gregtech.api.enums.Textures.BlockIcons.CONCRETES[aMeta].getIcon(); @@ -73,29 +75,4 @@ public class GT_Block_Concretes aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed; } } - - /** - public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { - Block tBlock = aWorld.getBlock(aX, aY + 1, aZ); - if (((aEntity instanceof EntityLivingBase)) && (!(tBlock instanceof IFluidBlock)) && (!(tBlock instanceof BlockLiquid)) && (aEntity.onGround) && (!aEntity.isInWater()) && (!aEntity.isWet())) { - if (aEntity.isSneaking()) { - aEntity.motionX *= 0.8999999761581421D; - aEntity.motionZ *= 0.8999999761581421D; - } else { - if (aEntity.motionX < 6.0 && aEntity.motionZ < 6.0) { - aEntity.motionX *= 1.100000023841858D; - aEntity.motionZ *= 1.100000023841858D; - } - } - } - } - - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - Block tBlock = aWorld.getBlock(aX, aY + 1, aZ); - if (((tBlock instanceof IFluidBlock)) || ((tBlock instanceof BlockLiquid))) { - return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 0.875D, aZ + 1); - } - **/ } 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 39d68ce933..5c98c18920 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Granites.java @@ -12,8 +12,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -public class GT_Block_Granites - extends GT_Block_Stones_Abstract { +public class GT_Block_Granites extends GT_Block_Stones_Abstract { public GT_Block_Granites() { super(GT_Item_Granites.class, "gt.blockgranites"); setResistance(60.0F); @@ -51,14 +50,17 @@ public class GT_Block_Granites GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(this, 1, 15)); } + @Override public int getHarvestLevel(int aMeta) { return 3; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F; } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { return gregtech.api.enums.Textures.BlockIcons.GRANITES[aMeta].getIcon(); @@ -66,6 +68,7 @@ public class GT_Block_Granites return gregtech.api.enums.Textures.BlockIcons.GRANITES[0].getIcon(); } + @Override public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { return !(entity instanceof EntityWither); } 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 0b0d065789..0d673a020e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -39,15 +39,15 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -public class GT_Block_Machines - extends GT_Generic_Block - implements IDebugableBlock, ITileEntityProvider { - public static ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal(); +public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider { + private static final ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<>(); + private boolean renderAsNormalBlock; public GT_Block_Machines() { super(GT_Item_Machines.class, "gt.blockmachines", new GT_Material_Machines()); @@ -57,8 +57,11 @@ public class GT_Block_Machines setStepSound(soundTypeMetal); setCreativeTab(GregTech_API.TAB_GREGTECH); this.isBlockContainer = true; + this.renderAsNormalBlock = true; + this.useNeighborBrightness = true; } + @Override public String getHarvestTool(int aMeta) { if (aMeta >= 8 && aMeta <= 11) { return "cutter"; @@ -66,14 +69,17 @@ public class GT_Block_Machines return "wrench"; } + @Override public int getHarvestLevel(int aMeta) { return aMeta % 4; } + @Override protected boolean canSilkHarvest() { return false; } + @Override public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof BaseTileEntity)) { @@ -81,6 +87,7 @@ public class GT_Block_Machines } } + @Override public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof BaseMetaPipeEntity)) { @@ -88,6 +95,7 @@ public class GT_Block_Machines } } + @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { super.onBlockAdded(aWorld, aX, aY, aZ); if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { @@ -95,22 +103,27 @@ public class GT_Block_Machines } } + @Override public String getUnlocalizedName() { return "gt.blockmachines"; } + @Override public String getLocalizedName() { return StatCollector.translateToLocal(getUnlocalizedName() + ".name"); } + @Override public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { return 0; } + @Override public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return (GregTech_API.sMachineFlammable) && (aWorld.getBlockMetadata(aX, aY, aZ) == 0) ? 100 : 0; + return GregTech_API.sMachineFlammable && (aWorld.getBlockMetadata(aX, aY, aZ) == 0) ? 100 : 0; } + @Override public int getRenderType() { if (GT_Renderer_Block.INSTANCE == null) { return super.getRenderType(); @@ -118,80 +131,109 @@ public class GT_Block_Machines return GT_Renderer_Block.INSTANCE.mRenderID; } + @Override public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) { - return (GregTech_API.sMachineFlammable) && (aWorld.getBlockMetadata(aX, aY, aZ) == 0); + return GregTech_API.sMachineFlammable && (aWorld.getBlockMetadata(aX, aY, aZ) == 0); } + @Override public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return (GregTech_API.sMachineFlammable) && (aWorld.getBlockMetadata(aX, aY, aZ) == 0); + return GregTech_API.sMachineFlammable && (aWorld.getBlockMetadata(aX, aY, aZ) == 0); } + @Override public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) { return true; } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean hasTileEntity(int aMeta) { return true; } + @Override public boolean hasComparatorInputOverride() { return true; } + @Override public boolean renderAsNormalBlock() { - return false; + return renderAsNormalBlock; + } + + public GT_Block_Machines setRenderAsNormalBlock(boolean aBool) { + renderAsNormalBlock = aBool; + return this; } + @Override public boolean canProvidePower() { return true; } + @Override public boolean isOpaqueCube() { return false; } + @Override public TileEntity createNewTileEntity(World aWorld, int aMeta) { return createTileEntity(aWorld, aMeta); } + @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { return Textures.BlockIcons.MACHINE_LV_SIDE.getIcon(); } + @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int aSide, int aMeta) { return Textures.BlockIcons.MACHINE_LV_SIDE.getIcon(); } + @Override public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; + return tTileEntity != null && tTileEntity.receiveClientEvent(aData1, aData2); } - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + @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) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { - ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (tTileEntity instanceof IGregTechTileEntity && + ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity) + .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); return; } super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); } + @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + if (tTileEntity instanceof IGregTechTileEntity && + ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -199,10 +241,10 @@ public class GT_Block_Machines @Override @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) - { + public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + if (tTileEntity instanceof IGregTechTileEntity && + ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -211,27 +253,32 @@ public class GT_Block_Machines @Override //THIS public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { - AxisAlignedBB bbb=((IGregTechTileEntity)tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity)tTileEntity).getWorld(), 0, 0, 0); - minX=bbb.minX;//This essentially sets block bounds - minY=bbb.minY; - minZ=bbb.minZ; - maxX=bbb.maxX; - maxY=bbb.maxY; - maxZ=bbb.maxZ; + if (tTileEntity instanceof IGregTechTileEntity && + (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) + .getCollisionBoundingBoxFromPool( + ((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); + minX = bbb.minX; //This essentially sets block bounds + minY = bbb.minY; + minZ = bbb.minZ; + maxX = bbb.maxX; + maxY = bbb.maxY; + maxZ = bbb.maxZ; return; } - super.setBlockBoundsBasedOnState(blockAccess,aX,aY,aZ); + super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); } @Override public void setBlockBoundsForItemRender() { - super.setBlockBounds(0,0,0,1,1,1); + super.setBlockBounds(0, 0, 0, 1, 1, 1); } + @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + if (tTileEntity instanceof IGregTechTileEntity && + ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); return; } @@ -239,69 +286,74 @@ public class GT_Block_Machines } @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister aIconRegister) { - if (GregTech_API.sPostloadFinished) { - GT_Log.out.println("GT_Mod: Setting up Icon Register for Blocks"); - GregTech_API.sBlockIcons = aIconRegister; - - GT_Log.out.println("GT_Mod: Registering MetaTileEntity specific Textures"); - try { - for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) { - if (tMetaTileEntity != null) { - tMetaTileEntity.registerIcons(aIconRegister); - } - } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} - GT_Log.out.println("GT_Mod: Registering Crop specific Textures"); - try { - for (GT_BaseCrop tCrop : GT_BaseCrop.sCropList) { - tCrop.registerSprites(aIconRegister); + if (!GregTech_API.sPostloadFinished) return; + GT_Log.out.println("GT_Mod: Setting up Icon Register for Blocks"); + GregTech_API.setBlockIconRegister(aIconRegister); + + GT_Log.out.println("GT_Mod: Registering MetaTileEntity specific Textures"); + try { + for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) { + if (tMetaTileEntity != null) { + tMetaTileEntity.registerIcons(aIconRegister); } - } catch (Throwable e) { - e.printStackTrace(GT_Log.err); } - GT_Log.out.println("GT_Mod: Starting Block Icon Load Phase"); - GT_FML_LOGGER.info("GT_Mod: Starting Block Icon Load Phase"); - try { - for (Runnable tRunnable : GregTech_API.sGTBlockIconload) { - tRunnable.run(); - } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} - GT_Log.out.println("GT_Mod: Finished Block Icon Load Phase"); - GT_FML_LOGGER.info("GT_Mod: Finished Block Icon Load Phase"); + } catch (Exception e) { + e.printStackTrace(GT_Log.err); } + GT_Log.out.println("GT_Mod: Registering Crop specific Textures"); + try { + for (GT_BaseCrop tCrop : GT_BaseCrop.sCropList) { + tCrop.registerSprites(aIconRegister); + } + } catch (Exception e) { + e.printStackTrace(GT_Log.err); + } + GT_Log.out.println("GT_Mod: Starting Block Icon Load Phase"); + GT_FML_LOGGER.info("GT_Mod: Starting Block Icon Load Phase"); + try { + for (Runnable tRunnable : GregTech_API.sGTBlockIconload) { + tRunnable.run(); + } + } catch (Exception e) { + e.printStackTrace(GT_Log.err); + } + GT_Log.out.println("GT_Mod: Finished Block Icon Load Phase"); + GT_FML_LOGGER.info("GT_Mod: Finished Block Icon Load Phase"); } - public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { - return super.getBlockHardness(aWorld, aX, aY, aZ); - } - + @Override public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof BaseMetaTileEntity)) && (((BaseMetaTileEntity) tTileEntity).privateAccess()) && (!((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true))) { - return -1.0F; - } - return super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity && + ((BaseMetaTileEntity) tTileEntity).privateAccess() && + !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? + -1.0F : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); } - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) { + @Override + public boolean onBlockActivated( + World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity == null) { return false; } - if(aPlayer.isSneaking()){ - ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if(tCurrentItem!=null){ - if(!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)){ - return false; - } - } + if (aPlayer.isSneaking()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if ( + tCurrentItem != null && + !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) && + !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) && + !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) && + !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) + ) return false; } if ((tTileEntity instanceof IGregTechTileEntity)) { if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { return false; } - if ((!aWorld.isRemote) && (!((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer))) { + if ((!aWorld.isRemote) && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer)) { return true; } return ((IGregTechTileEntity) tTileEntity).onRightclick(aPlayer, (byte) aSide, par1, par2, par3); @@ -309,46 +361,55 @@ public class GT_Block_Machines return false; } + @Override public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity))) { + if (tTileEntity instanceof IGregTechTileEntity) { ((IGregTechTileEntity) tTileEntity).onLeftclick(aPlayer); } } + @Override public int getDamageValue(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof IGregTechTileEntity)) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getMetaTileID(); } return 0; } + @Override public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof BaseMetaTileEntity)) { - GT_Log.exp.println("Explosion at :"+aX + " | " + aY+ " | " + aZ +" DIMID: " + aWorld.provider.dimensionId+ " due to near explosion!"); + 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); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); } + @Override public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof IGregTechTileEntity)) { + if (tTileEntity instanceof IGregTechTileEntity) { IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; mTemporaryTileEntity.set(tGregTechTileEntity); for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); i++) { ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); if ((tItem != null) && (tItem.stackSize > 0) && (tGregTechTileEntity.isValidSlot(i))) { - EntityItem tItemEntity = new EntityItem(aWorld, aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + EntityItem tItemEntity = new EntityItem(aWorld, + aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); if (tItem.hasTagCompound()) { tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); } - tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.0500000007450581D); - tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); - tItemEntity.motionZ = (XSTR_INSTANCE.nextGaussian() * 0.0500000007450581D); + tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.05D); + tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D); + tItemEntity.motionZ = (XSTR_INSTANCE.nextGaussian() * 0.05D); aWorld.spawnEntityInWorld(tItemEntity); tItem.stackSize = 0; tGregTechTileEntity.setInventorySlotContents(i, null); @@ -359,65 +420,76 @@ public class GT_Block_Machines aWorld.removeTileEntity(aX, aY, aZ); } + @Override public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { return ((IGregTechTileEntity) tTileEntity).getDrops(); } - return mTemporaryTileEntity.get() == null ? new ArrayList() : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops(); + IGregTechTileEntity tGregTechTileEntity = mTemporaryTileEntity.get(); + ArrayList<ItemStack> tDrops; + if (tGregTechTileEntity == null) { + tDrops = (ArrayList<ItemStack>) Collections.<ItemStack>emptyList(); + } else { + tDrops = tGregTechTileEntity.getDrops(); + mTemporaryTileEntity.remove(); + } + return tDrops; } + @Override public boolean removedByPlayer(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, boolean aWillHarvest) { - if (aWillHarvest) { - return true; // This delays deletion of the block until after getDrops - } else { - return super.removedByPlayer(aWorld, aPlayer, aX, aY, aZ, false); - } + // This delays deletion of the block until after getDrops + return aWillHarvest || super.removedByPlayer(aWorld, aPlayer, aX, aY, aZ, false); } @Override - public void harvestBlock(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, int aMeta) - { + public void harvestBlock(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, int aMeta) { super.harvestBlock(aWorld, aPlayer, aX, aY, aZ, aMeta); aWorld.setBlockToAir(aX, aY, aZ); } - + + @Override public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity))) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide); } return 0; } + @Override public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if ((aSide < 0) || (aSide > 5)) { + if (aSide < 0 || aSide > 5) { return 0; } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity))) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)); } return 0; } + @Override public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if ((aSide < 0) || (aSide > 5)) { + if (aSide < 0 || aSide > 5) { return 0; } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity))) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)); } return 0; } + @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { if (!aWorld.isRemote) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity != null) && (chance < 1.0F)) { - if (((tTileEntity instanceof BaseMetaTileEntity)) && (GregTech_API.sMachineNonWrenchExplosions)) { - GT_Log.exp.println("Explosion at :"+aX + " | " + aY+ " | " + aZ +" DIMID: "+ aWorld.provider.dimensionId+ " due to NonWrench picking/Rain!"); + 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); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } } else { @@ -426,44 +498,60 @@ public class GT_Block_Machines } } + @Override public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) { return true; } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null) { - if ((tTileEntity instanceof BaseMetaTileEntity)) { - return true; - } - if (((tTileEntity instanceof BaseMetaPipeEntity)) && ((((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0)) { + if (tTileEntity instanceof BaseMetaTileEntity) { return true; } - if (((tTileEntity instanceof ICoverable)) && (((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0)) { + if (tTileEntity instanceof BaseMetaPipeEntity && + (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { return true; } + return tTileEntity instanceof ICoverable && + ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; } return false; } + @Override + public boolean isBlockNormalCube() { + return true; + } + + /** + * Returns the default ambient occlusion value based on block opacity + */ + @SideOnly(Side.CLIENT) + @Override + public float getAmbientOcclusionLightValue() + { + return this.renderAsNormalBlock() ? 0.2F : 0.5F; + } + + @Override public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity == null) { - return 0; - } - if ((tTileEntity instanceof IGregTechTileEntity)) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getLightOpacity(); } return aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0; } + @Override public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof BaseMetaTileEntity)) { + if (tTileEntity instanceof BaseMetaTileEntity) { return ((BaseMetaTileEntity) tTileEntity).getLightValue(); } return 0; } + @Override public TileEntity createTileEntity(World aWorld, int aMeta) { if (aMeta < 4) { return GregTech_API.constructBaseMetaTileEntity(); @@ -471,76 +559,87 @@ public class GT_Block_Machines return new BaseMetaPipeEntity(); } - public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) { + @Override + public float getExplosionResistance( + Entity par1Entity, World aWorld, int aX, int aY, int aZ, + double explosionX, double explosionY, double explosionZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((tTileEntity instanceof IGregTechTileEntity))) { + if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6); } return 10.0F; } @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { + @Override + @SuppressWarnings("unchecked") // Old API uses raw List type + public void getSubBlocks(Item par1Item, CreativeTabs par2CreativeTabs, List par3List) { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { if (GregTech_API.METATILEENTITIES[i] != null) { - par3List.add(new ItemStack(par1, 1, i)); + par3List.add(new ItemStack(par1Item, 1, i)); } } } + @Override public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity == null) { + if (!(tTileEntity instanceof IGregTechTileEntity)) { return; } - if ((tTileEntity instanceof IGregTechTileEntity)) { - IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity; - if (aPlayer == null) { - var6.setFrontFacing((byte) 1); - } else { - int var7 = MathHelper.floor_double(aPlayer.rotationYaw * 4.0F / 360.0F + 0.5D) & 0x3; - int var8 = Math.round(aPlayer.rotationPitch); - if ((var8 >= 65) && (var6.isValidFacing((byte) 1))) { - var6.setFrontFacing((byte) 1); - } else if ((var8 <= -65) && (var6.isValidFacing((byte) 0))) { - var6.setFrontFacing((byte) 0); - } else { - switch (var7) { - case 0: - var6.setFrontFacing((byte) 2); - break; - case 1: - var6.setFrontFacing((byte) 5); - break; - case 2: - var6.setFrontFacing((byte) 3); - break; - case 3: - var6.setFrontFacing((byte) 4); - } - } - } + IGregTechTileEntity iGregTechTileEntity = (IGregTechTileEntity) tTileEntity; + if (aPlayer == null) { + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.UP.ordinal()); + return; + } + int yawQuadrant = MathHelper.floor_double(aPlayer.rotationYaw * 4.0F / 360.0F + 0.5D) & 0x3; + int pitch = Math.round(aPlayer.rotationPitch); + if (pitch >= 65 && iGregTechTileEntity.isValidFacing((byte) ForgeDirection.UP.ordinal())) { + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.UP.ordinal()); + return; + } + if (pitch <= -65 && iGregTechTileEntity.isValidFacing((byte) ForgeDirection.DOWN.ordinal())) { + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.DOWN.ordinal()); + return; + } + switch (yawQuadrant) { + case 0: + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.NORTH.ordinal()); + break; + case 1: + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.EAST.ordinal()); + break; + case 2: + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.SOUTH.ordinal()); + break; + case 3: + iGregTechTileEntity.setFrontFacing((byte) ForgeDirection.WEST.ordinal()); + break; + default: + break; } } - public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { + @Override + public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof BaseMetaTileEntity)) { + if (tTileEntity instanceof BaseMetaTileEntity) { return ((BaseMetaTileEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel); } - if ((tTileEntity instanceof BaseMetaPipeEntity)) { + if (tTileEntity instanceof BaseMetaPipeEntity) { return ((BaseMetaPipeEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel); } - return null; + return (ArrayList<String>) Collections.<String>emptyList(); } + @Override public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof IGregTechTileEntity)) { - if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) ((aColor ^ 0xFFFFFFFF) & 0xF)) { + if (tTileEntity instanceof IGregTechTileEntity) { + if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) ((~aColor) & 0xF)) { return false; } - ((IGregTechTileEntity) tTileEntity).setColorization((byte) ((aColor ^ 0xFFFFFFFF) & 0xF)); + ((IGregTechTileEntity) tTileEntity).setColorization((byte) ((~aColor) & 0xF)); return true; } return false; 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 abcc92a795..7fcfd7a29a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -15,13 +15,14 @@ public class GT_Block_Metal extends GT_Block_Storage { public OrePrefixes mPrefix; public IIconContainer[] mBlockIcons; public boolean mHideBlocks; + public static boolean mNEIisLoaded = Loader.isModLoaded("NotEnoughItems"); public GT_Block_Metal(String aName, Materials[] aMats, OrePrefixes aPrefix, IIconContainer[] aBlockIcons) { super(GT_Item_Storage.class, aName, Material.iron); mMats = aMats; mPrefix = aPrefix; mBlockIcons = aBlockIcons; - mHideBlocks = Loader.isModLoaded("NotEnoughItems"); + mHideBlocks = mNEIisLoaded; for (int i = 0; i < aMats.length; i++) { if (aMats[i].mMetaItemSubID > 0 && aMats[i].mHasParentMod) { @@ -29,11 +30,12 @@ public class GT_Block_Metal extends GT_Block_Storage { GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i)); } } - if (aMats.length<16 && Loader.isModLoaded("NotEnoughItems")) { + if (aMats.length<16 && mNEIisLoaded) { for (int i = aMats.length; i < 16; i++) codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i)); } } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16) && aMeta < mMats.length) { return mBlockIcons[aMeta].getIcon(); 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 bab31d85ed..c3f53a7bc5 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -4,14 +4,19 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; +import java.util.Arrays; + +import static gregtech.api.enums.Textures.BlockIcons.BASALT_STONE; +import static gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_STONE; +import static gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_STONE; +import static gregtech.api.enums.Textures.BlockIcons.MARBLE_STONE; + public class GT_Block_Ores extends GT_Block_Ores_Abstract { public GT_Block_Ores() { super("gt.blockores", 7, false, Material.rock); @@ -57,7 +62,15 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { } @Override - public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_RenderedTexture(Textures.BlockIcons.MARBLE_STONE), new GT_RenderedTexture(Textures.BlockIcons.BASALT_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; + public ITexture[] getTextureSet() { + final ITexture[] rTextures = new ITexture[16]; //Must have 16 entries. + Arrays.fill(rTextures, TextureFactory.of(Blocks.stone)); + rTextures[1] = TextureFactory.of(Blocks.netherrack); + rTextures[2] = TextureFactory.of(Blocks.end_stone); + rTextures[3] = TextureFactory.builder().addIcon(GRANITE_BLACK_STONE).stdOrient().build(); + rTextures[4] = TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build(); + rTextures[5] = TextureFactory.builder().addIcon(MARBLE_STONE).stdOrient().build(); + rTextures[6] = TextureFactory.builder().addIcon(BASALT_STONE).stdOrient().build(); + return rTextures; } -}
\ No newline at end of file +} 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 512136f1f8..48cd41187d 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 @@ -77,6 +77,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return 0; } + @Override public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { if (!FUCKING_LOCK) { FUCKING_LOCK = true; @@ -88,6 +89,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements FUCKING_LOCK = false; } + @Override public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) { if (!FUCKING_LOCK) { FUCKING_LOCK = true; @@ -132,42 +134,52 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return aMaterial.getDefaultLocalizedNameForItem(getLocalizedNameFormat(aMaterial)); } + @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_) { 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_) : false; } + @Override public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { return (!(entity instanceof EntityDragon)) && (super.canEntityDestroy(world, x, y, z, entity)); } + @Override public String getHarvestTool(int aMeta) { return aMeta < 8 ? "pickaxe" : "shovel"; } + @Override public int getHarvestLevel(int aMeta) { return aMeta == 5 || aMeta == 6 ? 2 : aMeta % 8; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F; } + @Override public float getExplosionResistance(Entity par1Entity, 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; } + @Override protected boolean canSilkHarvest() { return false; } + @Override public abstract String getUnlocalizedName(); + @Override public String getLocalizedName() { return StatCollector.translateToLocal(getUnlocalizedName() + aTextName); } + @Override public int getRenderType() { if (GT_Renderer_Block.INSTANCE == null) { return super.getRenderType(); @@ -175,42 +187,52 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return GT_Renderer_Block.INSTANCE.mRenderID; } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return true; } + @Override public boolean hasTileEntity(int aMeta) { return true; } + @Override public boolean renderAsNormalBlock() { return true; } + @Override public boolean isOpaqueCube() { return true; } + @Override public TileEntity createNewTileEntity(World aWorld, int aMeta) { return createTileEntity(aWorld, aMeta); } + @Override public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { return Blocks.stone.getIcon(0, 0); } + @Override public IIcon getIcon(int aSide, int aMeta) { return Blocks.stone.getIcon(0, 0); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister aIconRegister) { } + @Override public int getDamageValue(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((tTileEntity instanceof GT_TileEntity_Ores))) { @@ -219,6 +241,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return 0; } + @Override public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { @@ -236,6 +259,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements public abstract Materials[] getDroppedDusts(); //Must have 8 entries; can be null. + @Override public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { @@ -244,6 +268,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return mTemporaryTileEntity.get() == null ? new ArrayList() : ((GT_TileEntity_Ores) mTemporaryTileEntity.get()).getDrops(getDroppedBlock(), aFortune); } + @Override public TileEntity createTileEntity(World aWorld, int aMeta) { return new GT_TileEntity_Ores(); } @@ -274,4 +299,4 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements } } } -}
\ No newline at end of file +} 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 bea2320f01..6749f8d136 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 @@ -5,7 +5,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -50,6 +50,6 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 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)}; } -}
\ No newline at end of file +} 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 d3278f0cb4..5d78ab0aa3 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 @@ -5,7 +5,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -50,6 +50,6 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 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)}; } -}
\ No newline at end of file +} 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 7942d80b22..e4111af1c5 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 @@ -5,7 +5,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -50,6 +50,6 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 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)}; } -}
\ No newline at end of file +} 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 ec31cb212c..fc49ecc597 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -8,9 +8,10 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; import gregtech.api.items.GT_Generic_Block; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.WorldSpawnedEventBuilder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -38,8 +39,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public GT_Block_Reinforced(String aName) { super(GT_Item_Storage.class, aName, new GT_Material_Reinforced()); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - Textures.BlockIcons.casingTexturePages[1][i + 80] = new GT_CopiedBlockTexture(this, 6, i); + for (int i = 0; i < 16; i++) { + Textures.BlockIcons.casingTexturePages[1][i + 80] = TextureFactory.of(this, i); } setStepSound(soundTypeStone); setCreativeTab(GregTech_API.TAB_GREGTECH); @@ -58,7 +59,7 @@ public class GT_Block_Reinforced extends GT_Generic_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_Plascrete.set(new ItemStack(this.setHardness(40.0f).setResistance(100.0f), 1, 2)); + 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_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)); @@ -69,20 +70,19 @@ public class GT_Block_Reinforced extends GT_Generic_Block { ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10)); ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11)); ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12)); - //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteBlack)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteRed)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Block_IridiumTungstensteel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hBP", 'P', OrePrefixes.plate.get(Materials.Iridium), 'B', ItemList.Block_TungstenSteelReinforced.get(1L, new Object[0])}); - //GT_OreDictUnificator.setItemData(ItemList.Block_IridiumTungstensteel.get(1, new Object[0]), new ItemData(new MaterialStack(Materials.Iridium, OrePrefixes.plate.mMaterialAmount), new MaterialStack(Materials.TungstenSteel, 2*OrePrefixes.plate.mMaterialAmount),new MaterialStack(Materials.Concrete, OrePrefixes.dust.mMaterialAmount))); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1, new Object[0])}); - GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L, new Object[0]),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)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1)}); + GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WSW","GGG","WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', new ItemStack(Items.gunpowder,1),'S',new ItemStack(Items.string,1)}); } + @Override public String getHarvestTool(int aMeta) { if (aMeta == 5 || aMeta == 4 || aMeta == 6 || aMeta == 7) return "axe"; + if (aMeta == 2) return "wrench"; return "pickaxe"; } + @Override public int getHarvestLevel(int aMeta) { if (aMeta == 4||aMeta == 5 || aMeta == 6 || aMeta == 7) return 1; if (aMeta == 2) return 2; @@ -91,6 +91,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return 4; } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { @@ -125,6 +126,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { if (aWorld == null) { return 0.0F; @@ -140,7 +142,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return 400.0F; } if (tMeta == 2) { - return 40.0F; + return 5.0F; } if (tMeta == 3) { return 250.0F; @@ -163,6 +165,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); } + @Override public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { if (world == null) { return 0.0F; @@ -175,7 +178,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return 600.0F; } if (tMeta == 2) { - return 100.0F; + return 6.0F; } if (tMeta == 3) { return 400.0F; @@ -202,50 +205,62 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ); } + @Override public String getUnlocalizedName() { return this.mUnlocalizedName; } + @Override public String getLocalizedName() { return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return true; } + @Override public boolean renderAsNormalBlock() { return true; } + @Override public boolean isOpaqueCube() { return true; } + @Override public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { return false; } + @Override public int damageDropped(int par1) { return par1; } + @Override public int getDamageValue(World par1World, int par2, int par3, int par4) { return par1World.getBlockMetadata(par2, par3, par4); } + @Override public int quantityDropped(Random par1Random) { return 1; } + @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } + @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { if (par5 == 4) { this.dropBlockAsItem(aWorld, aX, aY, aZ, new ItemStack(Items.coal, XSTR_INSTANCE.nextInt(2) + 1, 1)); @@ -254,19 +269,26 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } } + @Override public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) { if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player); world.spawnEntityInWorld(entitytntprimed); - world.playSoundAtEntity(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F); - + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() + .setPitch(1f) + .setVolume(1f) + .setIdentifier("game.tnt.primed") + .setEntity(entitytntprimed) + .setWorld(world) + .run(); world.setBlockToAir(x, y, z); return false; } return super.removedByPlayer(world, player, x, y, z); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); @@ -275,6 +297,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } } + @Override public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) { if (world.isBlockIndirectlyGettingPowered(x, y, z)&&world.getBlockMetadata(x, y, z)==5) { @@ -282,6 +305,7 @@ 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()); @@ -291,6 +315,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { super.onBlockExploded(world, x, y, z, explosion); } + @Override public boolean onBlockActivated(World par1World, 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)&&par1World.getBlockMetadata(x, y, z)==5) @@ -302,10 +327,12 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return super.onBlockActivated(par1World, x, y, z, player, side, xOffset, yOffset, zOffset); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister aIconRegister) { } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; i++) { @@ -314,6 +341,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } } + @Override public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { return !(entity instanceof EntityWither); } 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 efac529b18..3838f30f0b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -36,14 +36,17 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { } } + @Override public int getHarvestLevel(int aMeta) { return 2; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F; } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { return gregtech.api.enums.Textures.BlockIcons.STONES[aMeta].getIcon(); 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 c9c31dae54..2f816b93c0 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 @@ -24,9 +24,7 @@ import net.minecraft.world.World; import java.util.List; import java.util.Random; -public class GT_Block_Stones_Abstract - extends GT_Generic_Block - implements IOreRecipeRegistrator { +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); @@ -66,6 +64,7 @@ public class GT_Block_Stones_Abstract GT_ModHandler.addCraftingRecipe(new ItemStack(this, 4, 11), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XX", "XX", 'X', new ItemStack(this, 4, 15)}); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { GT_Values.RA.addLaserEngraverRecipe(new ItemStack(this, 1, 7), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(this, 1, 6), 50, 16); @@ -133,14 +132,17 @@ public class GT_Block_Stones_Abstract return 1; } + @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister aIconRegister) { } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; i++) { 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 768fed6619..0a05ab300c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java @@ -28,70 +28,87 @@ public class GT_Block_Storage extends GT_Generic_Block { setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); } + @Override public String getHarvestTool(int aMeta) { return "pickaxe"; } + @Override public int getHarvestLevel(int aMeta) { return 1; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); } + @Override public float getExplosionResistance(Entity aTNT) { return Blocks.iron_block.getExplosionResistance(aTNT); } + @Override public String getUnlocalizedName() { return this.mUnlocalizedName; } + @Override public String getLocalizedName() { return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return true; } + @Override public boolean renderAsNormalBlock() { return true; } + @Override public boolean isOpaqueCube() { return true; } + @Override public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { return true; } + @Override public int damageDropped(int par1) { return par1; } + @Override public int getDamageValue(World par1World, int par2, int par3, int par4) { return par1World.getBlockMetadata(par2, par3, par4); } + @Override public int quantityDropped(Random par1Random) { return 1; } + @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister aIconRegister) { } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; i++) { 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 680942d9fd..bcb50b2176 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -9,8 +9,7 @@ import net.minecraft.util.EnumChatFormatting; import java.util.List; -public class GT_Item_Casings1 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings1 extends GT_Item_Casings_Abstract { public GT_Item_Casings1(Block par1) { super(par1); } 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 1d069d94f7..ed705d0c57 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java @@ -6,12 +6,12 @@ import net.minecraft.item.ItemStack; import java.util.List; -public class GT_Item_Casings2 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings2 extends GT_Item_Casings_Abstract { public GT_Item_Casings2(Block par1) { super(par1); } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); switch (getDamage(aStack)) { 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 5ecf0a9da6..b9eac8252a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java @@ -2,8 +2,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; -public class GT_Item_Casings3 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings3 extends GT_Item_Casings_Abstract { public GT_Item_Casings3(Block par1) { super(par1); } 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 05da650a51..10b39e3ea8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java @@ -2,8 +2,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; -public class GT_Item_Casings4 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings4 extends GT_Item_Casings_Abstract { public GT_Item_Casings4(Block par1) { super(par1); } 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 759fcafb5e..f3e58d2acc 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -2,48 +2,30 @@ 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 net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import java.util.List; -public class GT_Item_Casings5 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings5 extends GT_Item_Casings_Abstract { public GT_Item_Casings5(Block par1) { super(par1); } + + 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 mCoilTierTooltip = GT_LanguageManager.addStringLocalization("gt.coiltiertooltip", "Coil Tier = "); + @Override @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (getDamage(aStack)) { - case 0: - aList.add(this.mCoil01Tooltip); - break; - case 1: - aList.add(this.mCoil02Tooltip); - break; - case 2: - aList.add(this.mCoil03Tooltip); - break; - case 3: - aList.add(this.mCoil04Tooltip); - break; - case 4: - aList.add(this.mCoil05Tooltip); - break; - case 5: - aList.add(this.mCoil06Tooltip); - break; - case 6: - aList.add(this.mCoil07Tooltip); - break; - case 7: - aList.add(this.mCoil08Tooltip); - break; - case 8: - aList.add(this.mCoil09Tooltip); - } + HeatingCoilLevel coilLevel = GT_Block_Casings5.getCoilHeatFromDamage(aStack.getItemDamage()); + aList.add(mCoilHeatTooltip + coilLevel.getHeat() + mCoilUnitTooltip); + aList.add(mCoilTierTooltip + coilLevel.getTierName()); } } 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 f29e907827..ebeab2f0aa 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java @@ -2,9 +2,8 @@ package gregtech.common.blocks; import net.minecraft.block.Block; -public class GT_Item_Casings6 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings6 extends GT_Item_Casings_Abstract { public GT_Item_Casings6(Block par1) { super(par1); } -}
\ No newline at end of file +} 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 f1609ef684..19ca06d5ac 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java @@ -2,8 +2,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; -public class GT_Item_Casings8 - extends GT_Item_Casings_Abstract { +public class GT_Item_Casings8 extends GT_Item_Casings_Abstract { public GT_Item_Casings8(Block par1) { super(par1); } 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 1ca55d499f..0468da20d8 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 @@ -9,8 +9,7 @@ import net.minecraft.item.ItemStack; import java.util.List; -public abstract class GT_Item_Casings_Abstract - extends ItemBlock { +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"); @@ -25,6 +24,7 @@ public abstract class GT_Item_Casings_Abstract protected final String mCoilOverheated1Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated1.tooltip", "These coils are deprecated"); protected final String mCoilOverheated2Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated2.tooltip", "Place in crafting grid to get regular coils"); protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); + public GT_Item_Casings_Abstract(Block par1) { super(par1); setMaxDamage(0); @@ -32,14 +32,17 @@ public abstract class GT_Item_Casings_Abstract setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); } + @Override public int getMetadata(int aMeta) { return aMeta; } + @Override public String getUnlocalizedName(ItemStack aStack) { return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); aList.add(this.mNoMobsToolTip); 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 22a732a507..bf8957afb4 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java @@ -7,14 +7,14 @@ import net.minecraft.item.ItemStack; import java.util.List; -public class GT_Item_Concretes - extends GT_Item_Stones_Abstract { +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"); public GT_Item_Concretes(Block par1) { super(par1); } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); aList.add(this.mRunFasterToolTip); 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 71faf3b759..d14474c17f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Granites.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Granites.java @@ -2,8 +2,7 @@ package gregtech.common.blocks; import net.minecraft.block.Block; -public class GT_Item_Granites - extends GT_Item_Stones_Abstract { +public class GT_Item_Granites extends GT_Item_Stones_Abstract { public GT_Item_Granites(Block par1) { super(par1); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java new file mode 100644 index 0000000000..e376933623 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java @@ -0,0 +1,39 @@ +package gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import java.util.List; + +public class GT_Item_LongDistancePipe extends ItemBlock { + protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + + public GT_Item_LongDistancePipe(Block par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); + } + + @Override + public int getMetadata(int aMeta) { + return aMeta; + } + + @Override + public String getUnlocalizedName(ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + aList.add(this.mNoMobsToolTip); + aList.add(this.mNoTileEntityToolTip); + } +} 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 bf6b12b5cd..39eecdd5e4 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -4,7 +4,9 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IConnectable; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame; @@ -23,8 +25,7 @@ import net.minecraft.world.World; import java.util.List; -public class GT_Item_Machines - extends ItemBlock { +public class GT_Item_Machines extends ItemBlock { private static final String[] directionNames = {"Bottom", "Top", "North", "South", "West", "East"}; @@ -35,6 +36,7 @@ public class GT_Item_Machines setCreativeTab(GregTech_API.TAB_GREGTECH); } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { try { int tDamage = getDamage(aStack); @@ -46,29 +48,33 @@ public class GT_Item_Machines IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (tTileEntity.getDescription() != null) { int i = 0; + IMetaTileEntity metaTileEntity = tTileEntity.getMetaTileEntity(); + String suffix = (metaTileEntity instanceof MetaTileEntity && ((MetaTileEntity) metaTileEntity).isDisplaySecondaryDescription()) ? "Secondary_" : ""; for (String tDescription : tTileEntity.getDescription()) { if (GT_Utility.isStringValid(tDescription)) { - if(tDescription.contains("%%%")){ - String[] tString = tDescription.split("%%%"); - if(tString.length>=2){ - StringBuffer tBuffer = new StringBuffer(); - Object tRep[] = new String[tString.length / 2]; - for (int j = 0; j < tString.length; j++) - if (j % 2 == 0) tBuffer.append(tString[j]); - else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];} - aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished), tRep)); - } - }else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished ); - aList.add(tTranslated.equals("") ? tDescription : tTranslated);} + if(tDescription.contains("%%%")){ + String[] tString = tDescription.split("%%%"); + if(tString.length>=2){ + StringBuffer tBuffer = new StringBuffer(); + Object tRep[] = new String[tString.length / 2]; + for (int j = 0; j < tString.length; j++) + if (j % 2 == 0) tBuffer.append(tString[j]); + else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];} + aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_" + suffix + "DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished ), tRep)); + } + }else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_" + suffix + "DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished ); + aList.add(tTranslated.equals("") ? tDescription : tTranslated);} }else i++; } } if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY); + int inputTier = GT_Utility.getTier(tTileEntity.getInputVoltage()); + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + EnumChatFormatting.GREEN +")" + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputVoltage() > 0L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY); + int outputTier = GT_Utility.getTier(tTileEntity.getOutputVoltage()); + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputAmperage() > 1L) { aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY); @@ -111,10 +117,12 @@ public class GT_Item_Machines } } + @Override 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; } + @Override public String getUnlocalizedName(ItemStack aStack) { short tDamage = (short) getDamage(aStack); if ((tDamage < 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) { @@ -126,6 +134,7 @@ public class GT_Item_Machines return ""; } + @Override public String getItemStackDisplayName(ItemStack aStack) { String aName = super.getItemStackDisplayName(aStack); short aDamage = (short) getDamage(aStack); @@ -147,6 +156,7 @@ public class GT_Item_Machines return aName; } + @Override public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { super.onCreated(aStack, aWorld, aPlayer); short tDamage = (short) getDamage(aStack); @@ -155,6 +165,7 @@ public class GT_Item_Machines } } + @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) { short tDamage = (short) getDamage(aStack); if (tDamage > 0) { 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 8d53cfe513..ab31233abc 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -8,8 +8,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class GT_Item_Ores - extends ItemBlock { +public class GT_Item_Ores extends ItemBlock { public GT_Item_Ores(Block par1) { super(par1); setMaxDamage(0); @@ -17,14 +16,17 @@ public class GT_Item_Ores setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); } + @Override 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; } + @Override public String getUnlocalizedName(ItemStack aStack) { return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); } + @Override public String getItemStackDisplayName(ItemStack aStack) { String aName = super.getItemStackDisplayName(aStack); if (this.field_150939_a instanceof GT_Block_Ores_Abstract) { @@ -33,6 +35,7 @@ public class GT_Item_Ores return aName; } + @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ, int aMeta) { short tDamage = (short) getDamage(aStack); if (tDamage > 0) { 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 6e42569e6f..5170b1cbeb 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 @@ -9,8 +9,7 @@ import net.minecraft.item.ItemStack; import java.util.List; -public class GT_Item_Stones_Abstract - extends ItemBlock { +public class GT_Item_Stones_Abstract extends ItemBlock { private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); public GT_Item_Stones_Abstract(Block par1) { @@ -20,14 +19,17 @@ public class GT_Item_Stones_Abstract setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); } + @Override public String getUnlocalizedName(ItemStack aStack) { return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); } + @Override public int getMetadata(int aMeta) { return aMeta; } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); if (aStack.getItemDamage() % 8 >= 3) { 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 8cf838f538..3696cd4fc2 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Storage.java @@ -16,10 +16,12 @@ public class GT_Item_Storage extends ItemBlock { setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); } + @Override public String getUnlocalizedName(ItemStack aStack) { return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack); } + @Override public String getItemStackDisplayName(ItemStack aStack) { String aName = super.getItemStackDisplayName(aStack); if (this.field_150939_a instanceof GT_Block_Metal) { @@ -31,11 +33,13 @@ public class GT_Item_Storage extends ItemBlock { return aName; } + @Override public int getMetadata(int aMeta) { return aMeta; } + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); } -}
\ No newline at end of file +} 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 c81f382f5d..3b6cd37f9c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Casings.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Casings.java @@ -3,8 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; -public class GT_Material_Casings - extends Material { +public class GT_Material_Casings extends Material { public static final Material INSTANCE = new GT_Material_Casings(); private GT_Material_Casings() { @@ -12,6 +11,7 @@ public class GT_Material_Casings setRequiresTool(); } + @Override public boolean isOpaque() { return true; } 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 e55720f9fa..d51e588522 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Machines.java @@ -3,8 +3,7 @@ package gregtech.common.blocks; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; -public class GT_Material_Machines - extends Material { +public class GT_Material_Machines extends Material { public GT_Material_Machines() { super(MapColor.ironColor); setRequiresTool(); @@ -12,7 +11,8 @@ public class GT_Material_Machines setAdventureModeExempt(); } + @Override public boolean isOpaque() { - return false; + return true; } } 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 4aa9ba6931..38de5dbee7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Material_Reinforced.java @@ -3,14 +3,14 @@ package gregtech.common.blocks; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; -public class GT_Material_Reinforced - extends Material { +public class GT_Material_Reinforced extends Material { public GT_Material_Reinforced() { super(MapColor.stoneColor); setRequiresTool(); setAdventureModeExempt(); } + @Override public boolean isOpaque() { return true; } 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 b026e60dac..657ac9b934 100644 --- a/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Packet_Ores.java @@ -1,15 +1,13 @@ package gregtech.common.blocks; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; -import gregtech.api.net.GT_Packet; +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; -public class GT_Packet_Ores - extends GT_Packet { +public class GT_Packet_Ores extends GT_Packet_New { private int mX; private int mZ; private short mY; @@ -27,21 +25,20 @@ public class GT_Packet_Ores this.mMetaData = aMetaData; } - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(12); - - tOut.writeInt(this.mX); - tOut.writeShort(this.mY); - tOut.writeInt(this.mZ); - tOut.writeShort(this.mMetaData); - - return tOut.toByteArray(); + @Override + public void encode(ByteBuf aOut) { + aOut.writeInt(this.mX); + aOut.writeShort(this.mY); + aOut.writeInt(this.mZ); + aOut.writeShort(this.mMetaData); } - public GT_Packet decode(ByteArrayDataInput aData) { + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_Ores(aData.readInt(), aData.readShort(), aData.readInt(), aData.readShort()); } + @Override public void process(IBlockAccess aWorld) { if (aWorld != null) { TileEntity tTileEntity = aWorld.getTileEntity(this.mX, this.mY, this.mZ); @@ -54,6 +51,7 @@ public class GT_Packet_Ores } } + @Override public byte getPacketID() { return 3; } 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 2eb100599b..66dd4b7277 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -7,9 +7,8 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ITexturedTileEntity; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.XSTR; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; @@ -23,6 +22,8 @@ import net.minecraft.world.World; import java.util.ArrayList; import java.util.Random; +import static gregtech.api.enums.TextureSet.SET_NONE; + public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity { public short mMetaData = 0; public boolean mNatural = false; @@ -31,7 +32,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public static byte getHarvestData(short aMetaData, int aBaseBlockHarvestLevel) { Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; byte tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); - if(GT_Mod.gregtechproxy.mChangeHarvestLevels ) { + if (GT_Mod.gregtechproxy.mChangeHarvestLevels) { tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(GT_Mod.gregtechproxy.mMaxHarvestLevel, GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1))); } return tByte; @@ -111,12 +112,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit return false; } + @Override public void readFromNBT(NBTTagCompound aNBT) { super.readFromNBT(aNBT); this.mMetaData = aNBT.getShort("m"); this.mNatural = aNBT.getBoolean("n"); } + @Override public void writeToNBT(NBTTagCompound aNBT) { super.writeToNBT(aNBT); aNBT.setShort("m", this.mMetaData); @@ -130,6 +133,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } + @Override public Packet getDescriptionPacket() { if (!this.worldObj.isRemote) { if (!(this.mBlocked = ( @@ -147,38 +151,38 @@ 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)) { - 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 { + 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)) { + 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 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 + 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, this.zCoord, getHarvestData(this.mMetaData, ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), 0); + } + this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData, ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), 0); } public void convertOreBlock(World aWorld, int aX, int aY, int aZ) { - short aMeta = ((short) (int) (this.mMetaData % 1000 + (this.mMetaData / 16000 * 16000))); + short aMeta = ((short) (this.mMetaData % 1000 + (this.mMetaData / 16000 * 16000))); aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof GT_TileEntity_Ores) { @@ -191,12 +195,13 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit return this.mMetaData; } + @Override public boolean canUpdate() { return false; } public ArrayList<ItemStack> getDrops(Block aDroppedOre, int aFortune) { - ArrayList<ItemStack> rList = new ArrayList(); + ArrayList<ItemStack> rList = new ArrayList<>(); if (this.mMetaData <= 0) { rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); return rList; @@ -214,7 +219,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } if (aMaterial != null) { Random tRandom = new XSTR(this.xCoord ^ this.yCoord ^ this.zCoord); - ArrayList<ItemStack> tSelector = new ArrayList(); + ArrayList<ItemStack> tSelector = new ArrayList<>(); ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); @@ -259,28 +264,40 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit tSelector.add(tStack); } } - if (tSelector.size() > 0) { + 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++) { - rList.add(GT_Utility.copyAmount(1L, new Object[]{tSelector.get(tRandom.nextInt(tSelector.size()))})); + 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)); + if (dustMat != null) + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L)); } } return rList; } + @Override public ITexture[] getTexture(Block aBlock, byte aSide) { Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; if ((aMaterial != null) && (this.mMetaData < 32000)) { - GT_RenderedTexture aIconSet = new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa); + ITexture iTexture = TextureFactory.builder() + .addIcon(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? + OrePrefixes.ore.mTextureIndex : + OrePrefixes.oreSmall.mTextureIndex]) + .setRGBA(aMaterial.mRGBa) + .stdOrient() + .build(); if (aBlock instanceof GT_Block_Ores_Abstract) { - return new ITexture[]{((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], aIconSet}; + return new ITexture[]{ + ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture}; } } - return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])}; + return new ITexture[]{ + TextureFactory.of(Blocks.stone, 0), + TextureFactory.builder().addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]).stdOrient().build() + }; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index 77558e001d..c686f99c0b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -17,20 +17,20 @@ import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_Arm - extends GT_CoverBehavior { +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 - protected final static int EXPORT_MASK = 0x40000000; - protected final static int SLOT_ID_MASK = 0x3FFF; - protected final static int SLOT_ID_MIN = 0; - protected final static int CONVERTED_BIT = 0x80000000; + protected static final int EXPORT_MASK = 0x40000000; + protected static final int SLOT_ID_MASK = 0x3FFF; + protected static final int SLOT_ID_MIN = 0; + protected static final int CONVERTED_BIT = 0x80000000; public GT_Cover_Arm(int aTickRate) { this.mTickRate = aTickRate; } + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((((aTileEntity instanceof IMachineProgress)) && (!((IMachineProgress) aTileEntity).isAllowedToWork()))) { return aCoverVariable; @@ -43,15 +43,6 @@ public class GT_Cover_Arm aCoverVariable = CONVERTED_BIT | Math.min(Math.abs(aCoverVariable-1), SLOT_ID_MASK); } - boolean usePower = false; - if (aTileEntity.getUniversalEnergyCapacity() >= 128L) { - if (aTileEntity.isUniversalEnergyStored(256L)) { - usePower = true; - } else { - return aCoverVariable; - } - } - TileEntity toTile, fromTile; int toSlot, fromSlot; @@ -98,12 +89,10 @@ public class GT_Cover_Arm movedItems = GT_Utility.moveOneItemStack(fromTile, toTile, fromSide, toSide, null, false, (byte)64, (byte)1, (byte)64, (byte)1); } - if (usePower) - aTileEntity.decreaseStoredEnergyUnits(4*movedItems, true); - return aCoverVariable; } + @Override 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) { @@ -116,6 +105,7 @@ public class GT_Cover_Arm return aCoverVariable; } + @Override 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); @@ -157,42 +147,52 @@ public class GT_Cover_Arm return CONVERTED_BIT | export | ((adjSlot & SLOT_ID_MASK) << 14) | (intSlot & SLOT_ID_MASK); } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return this.mTickRate; } @@ -218,10 +218,10 @@ public class GT_Cover_Arm private GT_GuiFakeItemButton intSlotIcon, adjSlotIcon; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; private final String ANY_TEXT = trans("ANY", "Any"); @@ -402,33 +402,5 @@ public class GT_Cover_Arm return !export; return export; } - -// getStackInSlot wasn't available client side.. -// private void updateInventorySlots() { -// updateInventorySlot(intSlotIcon, internalSlotID, true); -// updateInventorySlot(adjSlotIcon, adjacentSlotID, false); -// } -// -// private void updateInventorySlot(GT_GuiFakeItemButton button, int slotID, boolean internal) { -// if (slotID == SLOT_ID_ANY) { -// button.setItem(null); -// return; -// } -// -// if (super.tile instanceof TileEntity && !super.tile.isDead()) { -// TileEntity tile; -// if (internal) -// tile = (TileEntity) super.tile; -// else -// tile = super.tile.getTileEntityAtSide(side); -// -// if (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() >= slotID) { -// ItemStack item = ((IInventory) tile).getStackInSlot(slotID); -// button.setItem(item); -// return; -// } -// } -// button.setItem(null); -// } } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java b/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java deleted file mode 100644 index 77647a43d8..0000000000 --- a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java +++ /dev/null @@ -1,21 +0,0 @@ -package gregtech.common.covers; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; - -public class GT_Cover_Blastproof - extends GT_CoverBehavior { - private final float mLevel; - - public GT_Cover_Blastproof(float aLevel) { - this.mLevel = aLevel; - } - - public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return this.mLevel; - } - - public boolean isSimpleCover() { - return true; - } -} 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 9624b68464..8b24bf3f8e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -4,6 +4,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUICover; import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiIconButton; +import gregtech.api.gui.widgets.GT_GuiIconCheckButton; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.net.GT_Packet_TileEntityCover; @@ -13,43 +14,63 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_ControlsWork - extends GT_CoverBehavior { +public class GT_Cover_ControlsWork extends GT_CoverBehavior { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aTileEntity instanceof IMachineProgress) { - if ((aInputRedstone > 0) == (aCoverVariable == 0) && aCoverVariable != 2) - ((IMachineProgress) aTileEntity).enableWorking(); - else + if (aCoverVariable < 2) { + if ((aInputRedstone > 0) == (aCoverVariable == 0)) + ((IMachineProgress) aTileEntity).enableWorking(); + else + ((IMachineProgress) aTileEntity).disableWorking(); + ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); + } + else if (aCoverVariable == 2) { ((IMachineProgress) aTileEntity).disableWorking(); - ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); + } else { + if (((IMachineProgress) aTileEntity).wasShutdown()) { + ((IMachineProgress) aTileEntity).disableWorking(); + GT_Utility.sendChatToPlayer(lastPlayer, aTileEntity.getInventoryName() + "at " + String.format("(%d,%d,%d)", aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) + " shut down."); + return 2; + } else { + return 3 + doCoverThings(aSide,aInputRedstone, aCoverID, aCoverVariable - 3, aTileEntity, aTimer); + } + } } return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { if ((aTileEntity instanceof IMachineProgress)) { ((IMachineProgress) aTileEntity).enableWorking(); @@ -58,21 +79,30 @@ public class GT_Cover_ControlsWork return true; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3; + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 5; if(aCoverVariable <0){aCoverVariable = 2;} if (aCoverVariable == 0) { - GT_Utility.sendChatToPlayer(aPlayer, trans("003", "Normal")); + GT_Utility.sendChatToPlayer(aPlayer, trans("003", "Enable with Signal")); } if (aCoverVariable == 1) { - GT_Utility.sendChatToPlayer(aPlayer, trans("004", "Inverted")); + GT_Utility.sendChatToPlayer(aPlayer, trans("004", "Disable with Signal")); } if (aCoverVariable == 2) { - GT_Utility.sendChatToPlayer(aPlayer, trans("005", "No Work at all")); + GT_Utility.sendChatToPlayer(aPlayer, trans("005", "Disabled")); } + if (aCoverVariable == 3) { + GT_Utility.sendChatToPlayer(aPlayer, trans("505", "Enable with Signal (Safe)")); + } + if (aCoverVariable == 4) { + GT_Utility.sendChatToPlayer(aPlayer, trans("506", "Disable with Signal (Safe)")); + } + // TODO: Set lastPlayer return aCoverVariable; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } @@ -96,10 +126,10 @@ public class GT_Cover_ControlsWork private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -107,10 +137,11 @@ public class GT_Cover_ControlsWork this.coverID = aCoverID; this.coverVariable = aCoverVariable; - GuiButton b; - b = new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.REDSTONE_ON); - b = new GT_GuiIconButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF); - b = new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CROSS); + new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.REDSTONE_ON); + new GT_GuiIconButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF); + new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CROSS); + + new GT_GuiIconCheckButton(this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked(aCoverVariable > 2); } @Override @@ -119,6 +150,7 @@ public class GT_Cover_ControlsWork this.fontRendererObj.drawString(trans("243", "Enable with Redstone"), 3+startX + spaceX*1, 4+startY+spaceY*0, 0xFF555555); this.fontRendererObj.drawString(trans("244", "Disable with Redstone"),3+startX + spaceX*1, 4+startY+spaceY*1, 0xFF555555); this.fontRendererObj.drawString(trans("245", "Disable machine"), 3+startX + spaceX*1, 4+startY+spaceY*2, 0xFF555555); + this.fontRendererObj.drawString(trans("507", "Safe Mode"), 3+startX + spaceX*1, 4+startY+spaceY*3, 0xFF555555); } @Override @@ -126,9 +158,17 @@ public class GT_Cover_ControlsWork updateButtons(); } + @Override public void buttonClicked(GuiButton btn) { if (getClickable(btn.id)) { - coverVariable = getNewCoverVariable(btn.id); + int bID = btn.id; + if (bID == 3) { + ((GT_GuiIconCheckButton) btn).setChecked(!((GT_GuiIconCheckButton) btn).isChecked()); + } else { + coverVariable = getNewCoverVariable(bID); + } + adjustCoverVariable(); + // TODO: Set lastPlayer; GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); @@ -147,7 +187,18 @@ public class GT_Cover_ControlsWork } private boolean getClickable(int id) { - return id != coverVariable; + return ((id != coverVariable && id != coverVariable - 3) || id == 3); } + + private void adjustCoverVariable() { + boolean safeMode = ((GT_GuiIconCheckButton) buttonList.get(3)).isChecked(); + if (safeMode && coverVariable < 2) { + coverVariable += 3; + } + if (!safeMode && coverVariable > 2) { + coverVariable -= 3; + } + } + } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java index aee46b7aab..b86f950e23 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -30,6 +30,7 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { this.mMaxStacks = maxStacks; } + @Override 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) { @@ -41,36 +42,13 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { toEntity = aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity; byte fromSide = aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, toSide = aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide; - boolean costsEnergy = ((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L); - byte moved; - - - if (costsEnergy) { - long tStoredEnergy = aTileEntity.getUniversalEnergyStored(); - int tMaxStacks = (int)(tStoredEnergy/(4*64*this.mMaxStacks)); - if (tMaxStacks > this.mMaxStacks) - tMaxStacks = this.mMaxStacks; - int tCost = moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks); - aTileEntity.decreaseStoredEnergyUnits(4 * tCost, true); - } else { - moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks); - } - -// for(int i=0 ; i < this.mMaxStacks ; i++) { -// // Costs energy but we don't have enough, bail -// if ((costsEnergy && !aTileEntity.isUniversalEnergyStored(256L))) -// break; -// -// moved = GT_Utility.moveOneItemStack(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); -// -// if(moved == 0) -// break; -// } + moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks); return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; if(aCoverVariable <0){aCoverVariable = 11;} @@ -91,42 +69,52 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { return aCoverVariable; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0); } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0); } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return this.mTickRate; } @@ -150,10 +138,10 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -184,6 +172,7 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (getClickable(btn.id)){ coverVariable = getNewCoverVariable(btn.id); 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 adc84a0e94..3cf0742d52 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java @@ -7,13 +7,14 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.ContainerWorkbench; import net.minecraft.network.play.server.S2DPacketOpenWindow; -public class GT_Cover_Crafting - extends GT_CoverBehavior { +public class GT_Cover_Crafting extends GT_CoverBehavior { + @Override 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 par1EntityPlayer) { return true; } 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 f2a37dd3cc..fbbaa32472 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -14,8 +14,8 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_DoesWork - extends GT_CoverBehavior { +public class GT_Cover_DoesWork extends GT_CoverBehavior { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aTileEntity instanceof IMachineProgress)) { if (aCoverVariable < 2) { @@ -34,6 +34,7 @@ public class GT_Cover_DoesWork return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4; if(aCoverVariable <0){aCoverVariable = 3;} @@ -46,34 +47,42 @@ public class GT_Cover_DoesWork return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 5; } @@ -97,10 +106,10 @@ public class GT_Cover_DoesWork private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -135,6 +144,7 @@ public class GT_Cover_DoesWork updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (getClickable(btn.id)){ boolean state = false; 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 e26d7bb4a2..5fa2244761 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -14,8 +14,8 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; -public class GT_Cover_Drain - extends GT_CoverBehavior { +public class GT_Cover_Drain extends GT_CoverBehavior { + @Override 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) { @@ -57,6 +57,7 @@ public class GT_Cover_Drain return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 6; if(aCoverVariable <0){aCoverVariable = 5;} @@ -71,14 +72,17 @@ public class GT_Cover_Drain return aCoverVariable; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2; } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return aCoverVariable < 3 ? 50 : 1; } 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 d12034d3a7..3af57ad081 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -19,8 +19,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_EUMeter - extends GT_CoverBehavior { +public class GT_Cover_EUMeter extends GT_CoverBehavior { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { long tScale = 0L; if (aCoverVariable < 2) { @@ -96,6 +96,7 @@ public class GT_Cover_EUMeter return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; if(aCoverVariable <0){aCoverVariable = 11;} @@ -116,34 +117,42 @@ public class GT_Cover_EUMeter return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 20; } @@ -167,10 +176,10 @@ public class GT_Cover_EUMeter private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -223,6 +232,7 @@ public class GT_Cover_EUMeter updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (btn.id == 6 || !isEnabled(btn.id)){ coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java index f5eaca9a74..6326cbbe41 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java @@ -7,8 +7,8 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_EnergyOnly - extends GT_CoverBehavior { +public class GT_Cover_EnergyOnly extends GT_CoverBehavior { + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + 1) % 3; switch(aCoverVariable) { @@ -19,18 +19,22 @@ public class GT_Cover_EnergyOnly return aCoverVariable; } + @Override public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 20.0F; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork()) { @@ -40,6 +44,7 @@ public class GT_Cover_EnergyOnly return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork()) { @@ -49,34 +54,42 @@ public class GT_Cover_EnergyOnly return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } + @Override public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override 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) { return false; } + @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java index 39c87669f1..d68b29e61b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -16,131 +16,181 @@ 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. + * <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. + */ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { + private static final int SPEED_LENGTH = 20; + private static final int TICK_RATE_LENGTH = Integer.SIZE - SPEED_LENGTH - 1; + private static final int TICK_RATE_MIN = 1; + private static final int TICK_RATE_MAX = (-1 >>> (Integer.SIZE - TICK_RATE_LENGTH)) + TICK_RATE_MIN; + private static final int TICK_RATE_BITMASK = (TICK_RATE_MAX - TICK_RATE_MIN) << SPEED_LENGTH; + public final int mTransferRate; + private boolean allowFluid = false; public GT_Cover_FluidRegulator(int aTransferRate) { + if (aTransferRate > (-1 >>> (Integer.SIZE - SPEED_LENGTH))) + throw new IllegalArgumentException("aTransferRate too big: " + aTransferRate); this.mTransferRate = aTransferRate; } - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - if (aCoverVariable == 0) { + private static int getSpeed(int aCoverVariable) { + // positive or 0 -> interval bits need to be set to zero + // negative -> interval bits need to be set to one + return aCoverVariable >= 0 ? aCoverVariable & ~TICK_RATE_BITMASK : aCoverVariable | TICK_RATE_BITMASK; + } + + private static int getTickRate(int aCoverVariable) { + // range: TICK_RATE_MIN ~ TICK_RATE_MAX + return ((Math.abs(aCoverVariable) & TICK_RATE_BITMASK) >>> SPEED_LENGTH) + TICK_RATE_MIN; + } + + private static int generateNewCoverVariable(int aFlowRate, int aTickRate) { + int tToStoreRaw = aTickRate - TICK_RATE_MIN; + int tToStore = aFlowRate >= 0 ? tToStoreRaw : ~tToStoreRaw; + return aFlowRate & ~TICK_RATE_BITMASK | (tToStore << SPEED_LENGTH); + } + + @Override + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + int tSpeed = getSpeed(aCoverVariable); + if (tSpeed == 0) { return aCoverVariable; } if ((aTileEntity instanceof IFluidHandler)) { IFluidHandler tTank1; IFluidHandler tTank2; - ForgeDirection directionFrom; - ForgeDirection directionTo; - if (aCoverVariable > 0) { + ForgeDirection directionFrom; + ForgeDirection directionTo; + if (tSpeed > 0) { tTank2 = aTileEntity.getITankContainerAtSide(aSide); tTank1 = (IFluidHandler) aTileEntity; - directionFrom = ForgeDirection.UNKNOWN; - directionTo = ForgeDirection.getOrientation(aSide).getOpposite(); + directionFrom = ForgeDirection.getOrientation(aSide); + directionTo = ForgeDirection.getOrientation(aSide).getOpposite(); } else { tTank1 = aTileEntity.getITankContainerAtSide(aSide); tTank2 = (IFluidHandler) aTileEntity; - directionFrom = ForgeDirection.getOrientation(aSide).getOpposite(); - directionTo = ForgeDirection.UNKNOWN; + directionFrom = ForgeDirection.getOrientation(aSide).getOpposite(); + directionTo = ForgeDirection.getOrientation(aSide); } if (tTank1 != null && tTank2 != null) { - FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aCoverVariable), false); + allowFluid = true; + FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(tSpeed), false); if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank2.fill(directionTo, tLiquid, false); if (tLiquid.amount > 0) { - if (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10)) { - if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); - tTank2.fill(directionTo, tTank1.drain(directionFrom, tLiquid.amount, true), true); - } - } else { - tTank2.fill(directionTo, tTank1.drain(directionFrom, tLiquid.amount, true), true); - } + tTank2.fill(directionTo, tTank1.drain(directionFrom, tLiquid.amount, true), true); } } + allowFluid = false; } } return aCoverVariable; } - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += aPlayer.isSneaking() ? 256 : 16; - } else { - aCoverVariable -= aPlayer.isSneaking() ? 256 : 16; - } - if (aCoverVariable > mTransferRate) { - aCoverVariable = mTransferRate; + private int adjustSpeed(EntityPlayer aPlayer, int aCoverVariable, int scale) { + int tSpeed = getSpeed(aCoverVariable); + tSpeed += scale; + int tTickRate = getTickRate(aCoverVariable); + if (Math.abs(tSpeed) > mTransferRate * tTickRate) { + tSpeed = mTransferRate * tTickRate * (tSpeed > 0 ? 1 : -1); + GT_Utility.sendChatToPlayer(aPlayer, trans("219", "Pump speed limit reached!")); } - if (aCoverVariable < (0 - mTransferRate)) { - aCoverVariable = (0 - mTransferRate); + if (tTickRate == 1) { + GT_Utility.sendChatToPlayer(aPlayer, + trans("048", "Pump speed: ") + tSpeed + trans("049", "L/tick ") + tSpeed * 20 + trans("050", "L/sec")); + } else { + GT_Utility.sendChatToPlayer(aPlayer, + String.format(trans("207", "Pump speed: %dL every %d ticks, %.2f L/sec on average"), tSpeed, tTickRate, tSpeed * 20d / tTickRate)); } - GT_Utility.sendChatToPlayer(aPlayer, - trans("048", "Pump speed: ") + aCoverVariable + trans("049", "L/tick ") + aCoverVariable * 20 + trans("050", "L/sec")); - return aCoverVariable; + return generateNewCoverVariable(tSpeed, tTickRate); } - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + @Override + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable++; + return adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? 256 : 16); } else { - aCoverVariable--; + return adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? -256 : -16); } - if (aCoverVariable > mTransferRate) { - aCoverVariable = mTransferRate; - } - if (aCoverVariable < (0 - mTransferRate)) { - aCoverVariable = (0 - mTransferRate); + } + + @Override + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable = adjustSpeed(aPlayer, aCoverVariable, 1); + } else { + aCoverVariable = adjustSpeed(aPlayer, aCoverVariable, -1); } - GT_Utility.sendChatToPlayer(aPlayer, - trans("048", "Pump speed: ") + aCoverVariable + trans("049", "L/tick ") + aCoverVariable * 20 + trans("050", "L/sec")); aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); return true; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } + return allowFluid; + } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } + return allowFluid; + } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } + return true; + } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 1; - } + return getTickRate(aCoverVariable); + } /** * GUI Stuff @@ -162,13 +212,16 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { private GT_GuiIntegerTextBox tBox, lBox; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; private int speed; private boolean export; + private int tickRate; + + private boolean warn = false; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -176,26 +229,32 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { this.coverID = aCoverID; this.coverVariable = aCoverVariable; - this.speed = Math.abs(coverVariable); - this.export = coverVariable >= 0; - new GT_GuiIconButton(this, 0,startX + spaceX*0,startY+spaceY*0, GT_GuiIcon.EXPORT).setTooltipText(trans("006","Export")); - new GT_GuiIconButton(this, 1,startX + spaceX*1,startY+spaceY*0, GT_GuiIcon.IMPORT).setTooltipText(trans("007","Import")); + int speed = getSpeed(coverVariable); + this.speed = Math.abs(speed); + this.export = speed >= 0; + this.tickRate = getTickRate(coverVariable); + new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT).setTooltipText(trans("006", "Export")); + new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT).setTooltipText(trans("007", "Import")); - tBox = new GT_GuiIntegerTextBox(this, 2,startX + spaceX*0,startY+spaceY*1 + 2, spaceX*4-3,12); - tBox.setText(String.valueOf(speed)); + tBox = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 1 + 2, spaceX * 4 - 3, 12); + tBox.setText(String.valueOf(this.speed)); tBox.setMaxStringLength(10); - lBox = new GT_GuiIntegerTextBox(this, 3,startX + spaceX*0,startY+spaceY*2 + 2, spaceX*4-3,12); - lBox.setText(String.valueOf(speed*20L)); - lBox.setMaxStringLength(10); + lBox = new GT_GuiIntegerTextBox(this, 3, startX + spaceX * 0, startY + spaceY * 2 + 2, spaceX * 4 - 3, 12); + lBox.setText(String.valueOf(this.tickRate)); + lBox.setMaxStringLength(4); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.getFontRenderer().drawString(trans("229","Import/Export" ), startX + spaceX*4, 4+startY+spaceY*0, 0xFF555555); - this.getFontRenderer().drawString(trans("049", "L/tick "), startX + spaceX*4, 4+startY+spaceY*1, 0xFF555555); - this.getFontRenderer().drawString(trans("050", "L/sec"), startX + spaceX*4, 4+startY+spaceY*2, 0xFF555555); + this.getFontRenderer().drawString(trans("229", "Import/Export"), startX + spaceX * 4, 4 + startY + spaceY * 0, 0xFF555555); + this.getFontRenderer().drawString(trans("200", " L"), startX + spaceX * 4, 4 + startY + spaceY * 1, 0xFF555555); + this.getFontRenderer().drawString(trans("209", " ticks"), startX + spaceX * 4, 4 + startY + spaceY * 2, 0xFF555555); + if (warn) + this.getFontRenderer().drawString(String.format(trans("210", "Average: %.2f L/sec"), speed * 20d / tickRate), startX + spaceX * 0, 4 + startY + spaceY * 3, 0xffff0000); + else + this.getFontRenderer().drawString(String.format(trans("210", "Average: %.2f L/sec"), speed * 20d / tickRate), startX + spaceX * 0, 4 + startY + spaceY * 3, 0xFF555555); } @Override @@ -204,7 +263,8 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { tBox.setFocused(true); } - public void buttonClicked(GuiButton btn){ + @Override + public void buttonClicked(GuiButton btn){ if (getClickable(btn.id)){ coverVariable = getNewCoverVariable(btn.id); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); @@ -247,18 +307,27 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { return; } - if (box.id == 3) - i = i / 20; - - if (i > mTransferRate) - i = mTransferRate; - else if (i <= 0) - i = 0; - - speed = (int) i; - - tBox.setText(String.valueOf(speed)); - lBox.setText(String.valueOf(speed*20)); + warn = false; + if (box.id == 2) { + if (i > (long) mTransferRate * tickRate) { + i = (long) mTransferRate * tickRate; + warn = true; + } else if (i < 0) { + i = 0; + } + speed = (int) i; + } else if (box.id == 3) { + if (i > TICK_RATE_MAX) { + i = tickRate; + } else if (speed > mTransferRate * i) { + i = Math.min(TICK_RATE_MAX, (speed + mTransferRate - 1) / mTransferRate); + warn = true; + } else if (i < TICK_RATE_MIN) { + i = 1; + } + tickRate = (int) i; + } + box.setText(String.valueOf(i)); coverVariable = getNewCoverVariable(2); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); @@ -266,7 +335,10 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { @Override public void resetTextBox(GT_GuiIntegerTextBox box) { - box.setText(String.valueOf(speed)); + if (box.id == 2) + box.setText(String.valueOf(speed)); + else if (box.id == 3) + box.setText(String.valueOf(tickRate)); } private void updateButtons(){ @@ -281,15 +353,12 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior { switch (id) { case 0: export = true; - return speed; + return generateNewCoverVariable(speed, tickRate); case 1: export = false; - return -speed; + return generateNewCoverVariable(-speed, tickRate); case 2: - if (export) - return speed; - else - return -speed; + return generateNewCoverVariable(export ? speed : -speed, tickRate); } return coverVariable; } 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 bc966d3f54..0c0cb27d1f 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java @@ -28,6 +28,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { private final int ANY_INPUT_FILTER_OUTPUT = 6; // 110 private final int ANY_INPUT_INVERT_OUTPUT = 7; // 111 + @Override public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { int aFilterMode = aCoverVariable & 7; int aFilterFluid = aCoverVariable >>> 3; @@ -39,6 +40,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { } + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return aCoverVariable; } @@ -58,6 +60,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { int aFilterMode = aCoverVariable & 7; aCoverVariable ^= aFilterMode; @@ -73,6 +76,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { return aCoverVariable; } + @Override public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { //GT_FML_LOGGER.info("rightclick"); if ( @@ -143,10 +147,12 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 0; } @@ -171,10 +177,10 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { private final GT_GuiFakeItemButton fluidFilterButton; protected String fluidFilterName; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GT_FluidFilterGUICover(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -239,6 +245,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehavior { updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (getClickable(btn.id)){ coverVariable = getNewCoverVariable(btn.id); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java new file mode 100644 index 0000000000..90c09f8168 --- /dev/null +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java @@ -0,0 +1,223 @@ +package gregtech.common.covers; + +import gregtech.api.enums.GT_Values; +import gregtech.api.gui.GT_GUICover; +import gregtech.api.gui.widgets.GT_GuiFakeItemButton; +import gregtech.api.gui.widgets.GT_GuiIcon; +import gregtech.api.gui.widgets.GT_GuiIconButton; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.net.GT_Packet_TileEntityCover; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; + +import java.util.Collections; +import java.util.List; + +import static gregtech.api.util.GT_Utility.*; + +public class GT_Cover_ItemFilter extends GT_CoverBehavior { + + private final boolean mExport; + + public GT_Cover_ItemFilter(boolean isExport){ + this.mExport = isExport; + } + + @Override + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int 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, + toSide = mExport ? GT_Utility.getOppositeSide(aSide) : aSide; + + int FilterId = aCoverVariable >>> 1; + List<ItemStack> Filter = Collections.singletonList(intToStack(FilterId)); + + boolean isWhiteList = (aCoverVariable & 1) != 0; + + moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, Filter, isWhiteList, (byte) 64, (byte) 1, (byte) 64, (byte) 1,64); + + return aCoverVariable; + } + + @Override + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ){ + ItemStack tStack = aPlayer.inventory.getCurrentItem(); + if (tStack != null){ + aCoverVariable = (stackToInt(tStack) << 1) + (aCoverVariable & 1); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + GT_Utility.sendChatToPlayer(aPlayer, trans("301", "Item Filter: ") + tStack.getDisplayName()); + } + else{ + aCoverVariable = aCoverVariable & 1; + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + GT_Utility.sendChatToPlayer(aPlayer, trans("300", "Filter Cleared!")); + } + return true; + } + + @Override + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + int mode = aCoverVariable & 1; + if (mode == 1) mode = 0; + else mode = 1; + if (mode == 1){ + GT_Utility.sendChatToPlayer(aPlayer, trans("124", "Blacklist Mode")); + } + else{ + GT_Utility.sendChatToPlayer(aPlayer, trans("125", "Whitelist Mode")); + } + aCoverVariable = (aCoverVariable & ~0x1) + mode; + return aCoverVariable; + } + + @Override + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + @Override + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + @Override + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } + + /** + * GUI Stuff + */ + + @Override + public boolean hasCoverGUI() { + return true; + } + + @Override + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + return new GT_Cover_ItemFilter.GUI(aSide, aCoverID, coverData, aTileEntity); + } + + private class GUI extends GT_GUICover { + private final byte side; + private final int coverID; + private int coverVariable; + private final GT_GuiFakeItemButton itemFilterButtons; + + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; + + public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); + this.side = aSide; + this.coverID = aCoverID; + this.coverVariable = aCoverVariable; + + GT_GuiIconButton b; + b = new GT_GuiIconButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.WHITELIST).setTooltipText(trans("125","Whitelist Mode")); + b = new GT_GuiIconButton(this, 1, startX + spaceX*1, startY+spaceY*0, GT_GuiIcon.BLACKLIST).setTooltipText(trans("124","Blacklist Mode")); + + itemFilterButtons = new GT_GuiFakeItemButton(this ,startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.SLOT_GRAY); + } + + @Override + public void drawExtras(int mouseX, int mouseY, float parTicks) { + super.drawExtras(mouseX, mouseY, parTicks); + this.fontRendererObj.drawString(trans("303", "Filter: "), startX + spaceX*0, 3+startY+spaceY*1, 0xFF555555); + this.fontRendererObj.drawString(trans("302", "Check Mode"), startX + spaceX*2, 3+startY+spaceY*0, 0xFF555555); + } + + @Override + protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { + updateButtons(); + } + + @Override + public void buttonClicked(GuiButton btn){ + if (getClickable(btn.id)){ + coverVariable = getNewCoverVariable(btn.id); + GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); + } + updateButtons(); + } + + private void updateButtons(){ + GuiButton b; + for (Object o : buttonList) { + b = (GuiButton) o; + b.enabled = getClickable(b.id); + } + ItemStack tItemStack = intToStack(coverVariable >>> 1); + if (tItemStack != null){ + itemFilterButtons.setItem(tItemStack); + return; + } + itemFilterButtons.setItem(null); + } + + private int getNewCoverVariable(int id) { + switch (id) { + case 0: + return coverVariable & ~0x1; + case 1: + return coverVariable | 0x1; + } + return coverVariable; + } + + private boolean getClickable(int id) { + switch (id) { + case 0: + return (0x1 & coverVariable) != 0; + case 1: + return (0x1 & coverVariable) == 0; + } + return false; + } + } +} 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 83b03b65a5..5d26f2079e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -10,20 +10,22 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_TileEntityCover; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; + import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_ItemMeter - extends GT_CoverBehavior { +public class GT_Cover_ItemMeter extends GT_CoverBehavior { // format: private static final int SLOT_MASK = 0x3FFFFFF; // 0 = all, 1 = 0 ... private static final int CONVERTED_BIT = 0x80000000; private static final int INVERT_BIT = 0x40000000; + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { //Convert from ver. 5.09.33.50 if ((CONVERTED_BIT & aCoverVariable) == 0) @@ -34,20 +36,26 @@ public class GT_Cover_ItemMeter else if (aCoverVariable > 1) aCoverVariable = CONVERTED_BIT | Math.min((aCoverVariable - 2), SLOT_MASK); - int[] tSlots; - if ((aCoverVariable & SLOT_MASK) > 0) - tSlots = new int[]{(aCoverVariable & SLOT_MASK) - 1}; - else - tSlots = aTileEntity.getAccessibleSlotsFromSide(aSide); - - int tMax = 0; - int tUsed = 0; - for (int i : tSlots) { - if (i >= 0 && i < aTileEntity.getSizeInventory()) { - tMax+=64; - ItemStack tStack = aTileEntity.getStackInSlot(i); - if (tStack != null) - tUsed += (tStack.stackSize<<6)/tStack.getMaxStackSize(); + long tMax = 0; + long tUsed = 0; + if (aTileEntity instanceof GT_MetaTileEntity_DigitalChestBase) { + GT_MetaTileEntity_DigitalChestBase dc = (GT_MetaTileEntity_DigitalChestBase)aTileEntity; + tMax = dc.getMaxItemCount(); // currently it is limited by int, but there is not much reason for that + ItemStack[] inv = dc.getStoredItemData(); + if (inv != null && inv.length > 1 && inv[1] != null) + tUsed = inv[1].stackSize; + } else { + int[] tSlots = (aCoverVariable & SLOT_MASK) > 0 ? + new int[] {(aCoverVariable & SLOT_MASK) - 1} : + aTileEntity.getAccessibleSlotsFromSide(aSide); + + for (int i : tSlots) { + if (i >= 0 && i < aTileEntity.getSizeInventory()) { + tMax += 64; + ItemStack tStack = aTileEntity.getStackInSlot(i); + if (tStack != null) + tUsed += (tStack.stackSize << 6) / tStack.getMaxStackSize(); + } } } @@ -61,6 +69,7 @@ public class GT_Cover_ItemMeter return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { if ((aCoverVariable & INVERT_BIT) == INVERT_BIT) { @@ -85,34 +94,42 @@ public class GT_Cover_ItemMeter return CONVERTED_BIT | (aCoverVariable & INVERT_BIT) | slot; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 5; } @@ -139,10 +156,10 @@ public class GT_Cover_ItemMeter private final GT_GuiFakeItemButton intSlotIcon; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; private final int maxSlot; @@ -169,7 +186,7 @@ public class GT_Cover_ItemMeter else maxSlot = -1; - if (maxSlot == -1) + if (maxSlot == -1 || tile instanceof GT_MetaTileEntity_DigitalChestBase) intSlot.setEnabled(false); } 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 85f61e8b74..347a6acfcc 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java @@ -3,14 +3,14 @@ package gregtech.common.covers; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; -public class GT_Cover_Lens - extends GT_CoverBehavior { +public class GT_Cover_Lens extends GT_CoverBehavior { private final byte mColor; public GT_Cover_Lens(byte aColor) { this.mColor = aColor; } + @Override public byte getLensColor(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return this.mColor; } 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 9ca2f77d62..9fa819cd33 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -16,8 +16,8 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -public class GT_Cover_LiquidMeter - extends GT_CoverBehavior { +public class GT_Cover_LiquidMeter extends GT_CoverBehavior { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aTileEntity instanceof IFluidHandler)) { FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN); @@ -46,6 +46,7 @@ public class GT_Cover_LiquidMeter return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aCoverVariable == 0) { GT_Utility.sendChatToPlayer(aPlayer, trans("055", "Normal")); @@ -55,34 +56,42 @@ public class GT_Cover_LiquidMeter return aCoverVariable == 0 ? 1 : 0; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 5; } @@ -105,10 +114,10 @@ public class GT_Cover_LiquidMeter private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -135,6 +144,7 @@ public class GT_Cover_LiquidMeter updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ boolean state = false; if (btn.id == 0) @@ -164,4 +174,4 @@ public class GT_Cover_LiquidMeter return coverVariable; } } -}
\ No newline at end of file +} 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 43160aa908..5a5d02b71d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java @@ -23,6 +23,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { return !(aRotor == null || !(aRotor.getItem() instanceof GT_MetaGenerated_Tool) || aRotor.getItemDamage() < 170 || aRotor.getItemDamage() > 176); } + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { boolean needsRepair = false; if (aTileEntity instanceof IGregTechTileEntity) { @@ -62,6 +63,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 14; if (aCoverVariable < 0) { @@ -114,34 +116,42 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 60; } @@ -187,10 +197,10 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { trans("NORMAL","Normal"), }; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -231,6 +241,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (btn.id == 7 || !isEnabled(btn.id)){ coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); 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 57f52ab42d..5857c92dab 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -19,6 +19,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { private String placer = ""; private int range = 8; + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { boolean playerDetected = false; @@ -58,6 +59,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3; if(aCoverVariable <0){aCoverVariable = 2;} @@ -69,34 +71,42 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 20; } @@ -119,10 +129,10 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -154,6 +164,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (!isEnabled(btn.id)){ coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); 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 a6f7d653b9..a5b860c0a4 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -16,14 +16,14 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -public class GT_Cover_Pump - extends GT_CoverBehavior{ +public class GT_Cover_Pump extends GT_CoverBehavior{ public final int mTransferRate; public GT_Cover_Pump(int aTransferRate) { this.mTransferRate = aTransferRate; } + @Override 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) { @@ -40,15 +40,8 @@ public class GT_Cover_Pump if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); - if (tLiquid.amount > 0) { - if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { - if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); - } - } else { - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); - } + if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); } } } else { @@ -56,15 +49,8 @@ public class GT_Cover_Pump if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); - if (tLiquid.amount > 0) { - if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { - if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); - tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); - } - } else { - tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); - } + if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { + tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); } } } @@ -73,6 +59,11 @@ public class GT_Cover_Pump return aCoverVariable; } + protected boolean canTransferFluid(FluidStack fluid) { + return true; + } + + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; if(aCoverVariable <0){aCoverVariable = 11;} @@ -93,30 +84,37 @@ public class GT_Cover_Pump return aCoverVariable; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { @@ -126,6 +124,7 @@ public class GT_Cover_Pump return (aCoverVariable >= 6) || (aCoverVariable % 2 != 0); } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { @@ -135,10 +134,12 @@ public class GT_Cover_Pump return (aCoverVariable >= 6) || (aCoverVariable % 2 == 0); } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } @@ -162,10 +163,10 @@ public class GT_Cover_Pump private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GT_PumpGUICover(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -196,6 +197,7 @@ public class GT_Cover_Pump updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (getClickable(btn.id)){ coverVariable = getNewCoverVariable(btn.id); 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 d942c944aa..41d1861ca1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -6,8 +6,8 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_RedstoneConductor - extends GT_CoverBehavior { +public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aCoverVariable == 0) { aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone()); @@ -17,6 +17,7 @@ public class GT_Cover_RedstoneConductor return aCoverVariable; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 7; if(aCoverVariable <0){aCoverVariable = 6;} @@ -32,34 +33,42 @@ public class GT_Cover_RedstoneConductor return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java index d76cda3ede..0bf008419b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java @@ -3,17 +3,19 @@ package gregtech.common.covers; import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -public class GT_Cover_RedstoneReceiverExternal - extends GT_Cover_RedstoneWirelessBase { +public class GT_Cover_RedstoneReceiverExternal extends GT_Cover_RedstoneWirelessBase { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { aTileEntity.setOutputRedstoneSignal(aSide, GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue()); return aCoverVariable; } + @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 84f0ba36f7..2173014509 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -4,8 +4,8 @@ import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IMachineProgress; -public class GT_Cover_RedstoneReceiverInternal - extends GT_Cover_RedstoneWirelessBase { +public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWirelessBase { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aTileEntity instanceof IMachineProgress) { if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) >0) @@ -17,10 +17,12 @@ public class GT_Cover_RedstoneReceiverInternal return aCoverVariable; } + @Override public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue(); } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java index 114fd8b3dc..cf322e78f1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -7,8 +7,8 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_RedstoneSignalizer - extends GT_CoverBehavior { +public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + 1) % 48; switch(aCoverVariable / 16) { @@ -19,34 +19,42 @@ public class GT_Cover_RedstoneSignalizer return aCoverVariable; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override 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 d4a334e18e..cd8f1f4ffc 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java @@ -3,17 +3,19 @@ package gregtech.common.covers; import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -public class GT_Cover_RedstoneTransmitterExternal - extends GT_Cover_RedstoneWirelessBase { +public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirelessBase { + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aInputRedstone)); return aCoverVariable; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java index f632561994..1c683966f9 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java @@ -3,21 +3,24 @@ package gregtech.common.covers; import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -public class GT_Cover_RedstoneTransmitterInternal - extends GT_Cover_RedstoneWirelessBase { +public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirelessBase { + @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))); return aCoverVariable; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } + @Override 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 1407311b88..93a729d0c2 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -3,26 +3,38 @@ package gregtech.common.covers; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUICover; +import gregtech.api.gui.widgets.GT_GuiIcon; +import gregtech.api.gui.widgets.GT_GuiIconCheckButton; import gregtech.api.gui.widgets.GT_GuiIntegerTextBox; import gregtech.api.interfaces.IGuiScreen; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_TileEntityCover; +import gregtech.api.net.GT_Packet_WirelessRedstoneCover; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; +import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public abstract class GT_Cover_RedstoneWirelessBase - extends GT_CoverBehavior { +public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { + + private static final int MAX_CHANNEL = 65535; + private static final int PRIVATE_MASK = 0xFFFE0000; + private static final int PUBLIC_MASK = 0x0000FFFF; + private static final int CHECKBOX_MASK = 0x00010000; + + @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); return true; } + @Override 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(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); - aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem()); + aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | (((Integer)GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())).hashCode() & PUBLIC_MASK); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); GT_Utility.sendChatToPlayer(aPlayer, trans("081", "Frequency: ") + aCoverVariable); return true; @@ -30,56 +42,80 @@ public abstract class GT_Cover_RedstoneWirelessBase return false; } + @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + + short tAdjustVal = 0; + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) { case 0: - aCoverVariable -= 32; + tAdjustVal = -32; break; case 1: - aCoverVariable += 32; + tAdjustVal = 32; break; case 2: - aCoverVariable -= 1024; + tAdjustVal = -1024; break; case 3: - aCoverVariable += 1024; + tAdjustVal = 1024; + } + + int tPublicChannel = (aCoverVariable & PUBLIC_MASK) + tAdjustVal; + + if (tPublicChannel < 0) { + aCoverVariable = aCoverVariable & ~PUBLIC_MASK; + } + else if (tPublicChannel > MAX_CHANNEL) { + aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | MAX_CHANNEL; + } + else { + aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | tPublicChannel; } } GT_Utility.sendChatToPlayer(aPlayer, trans("081", "Frequency: ") + aCoverVariable); return aCoverVariable; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } + @Override public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return trans("081", "Frequency: ") + aCoverVariable; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } @@ -103,10 +139,10 @@ public abstract class GT_Cover_RedstoneWirelessBase private GT_GuiIntegerTextBox fBox; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -115,21 +151,25 @@ public abstract class GT_Cover_RedstoneWirelessBase this.coverID = aCoverID; this.coverVariable = aCoverVariable; - fBox = new GT_GuiIntegerTextBoxWithMinus(this, 2,startX + spaceX*0,startY+spaceY*0 + 2, spaceX*4-3,12); - fBox.setText(String.valueOf(coverVariable)); + fBox = new GT_GuiShortTextBox(this, 2,startX + spaceX*0,startY+spaceY*0 + 2, spaceX*4-3,12); + fBox.setText(String.valueOf(coverVariable & PUBLIC_MASK)); fBox.setMaxStringLength(12); + GuiButton b; + b = new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); this.getFontRenderer().drawString(trans("246","Frequency" ), startX + spaceX*4, 4+startY+spaceY*0, 0xFF555555); + this.getFontRenderer().drawString(trans("601", "Use Private Frequency"), startX + spaceX * 1, startY + spaceY * 2 + 4, 0xFF555555); } @Override protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { fBox.setFocused(true); + ((GT_GuiIconCheckButton) buttonList.get(0)).setChecked((coverVariable & CHECKBOX_MASK) > 0); } @Override @@ -138,19 +178,19 @@ public abstract class GT_Cover_RedstoneWirelessBase if (box.isFocused()) { int step = Math.max(1, Math.abs(delta / 120)); step = (isShiftKeyDown() ? 1000 : isCtrlKeyDown() ? 50 : 1) * (delta > 0 ? step : -step); - long i; + long tCoverVariable; try { - i = Long.parseLong(box.getText()); + tCoverVariable = Long.parseLong(box.getText()); } catch (NumberFormatException e) { return; } - i = i + step; - if (i > Integer.MAX_VALUE) - i = Integer.MAX_VALUE; - else if (i < Integer.MIN_VALUE) - i = Integer.MIN_VALUE; + tCoverVariable = tCoverVariable + step; + if (tCoverVariable > MAX_CHANNEL) + tCoverVariable = MAX_CHANNEL; + else if (tCoverVariable < 0) + tCoverVariable = 0; - box.setText(String.valueOf(i)); + box.setText(String.valueOf(tCoverVariable)); return; } } @@ -158,42 +198,84 @@ public abstract class GT_Cover_RedstoneWirelessBase @Override public void applyTextBox(GT_GuiIntegerTextBox box) { - long i; + int tPublicChannel; String s = box.getText().trim(); try { - i = Long.parseLong(s); + tPublicChannel = Integer.parseInt(s); } catch (NumberFormatException e) { resetTextBox(box); return; } - if (i > Integer.MAX_VALUE) - i = Integer.MAX_VALUE; - else if (i < Integer.MIN_VALUE) - i = Integer.MIN_VALUE; + if (tPublicChannel > MAX_CHANNEL) + tPublicChannel = MAX_CHANNEL; + else if (tPublicChannel < 0) + tPublicChannel = 0; + int tCheckBoxValue = ((GT_GuiIconCheckButton)this.buttonList.get(0)).isChecked() ? CHECKBOX_MASK : 0; - coverVariable = (int) i; - fBox.setText(String.valueOf(coverVariable)); - GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); + coverVariable = tCheckBoxValue | tPublicChannel; + + fBox.setText(Integer.toString(tPublicChannel)); + GT_Values.NW.sendToServer(new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); } @Override public void resetTextBox(GT_GuiIntegerTextBox box) { - box.setText(String.valueOf(coverVariable)); + box.setText(String.valueOf(coverVariable & PUBLIC_MASK)); + } + + @Override + public void buttonClicked(GuiButton btn) { + + final GT_GuiIconCheckButton tBtn = (GT_GuiIconCheckButton) btn; + + tBtn.setChecked(!tBtn.isChecked()); + + int tPublicChannel = 0; + String tText = fBox.getText().trim(); + + if (tText.length() > 0) { + tPublicChannel = Integer.parseInt(tText); + } + + int tCheckBoxValue = tBtn.isChecked() ? CHECKBOX_MASK : 0; + + coverVariable = tCheckBoxValue | tPublicChannel; + + GT_Values.NW.sendToServer(new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); } - private class GT_GuiIntegerTextBoxWithMinus extends GT_GuiIntegerTextBox { + private class GT_GuiShortTextBox extends GT_GuiIntegerTextBox { - public GT_GuiIntegerTextBoxWithMinus(IGuiScreen gui, int id, int x, int y, int width, int height) { + public GT_GuiShortTextBox(IGuiScreen gui, int id, int x, int y, int width, int height) { super(gui, id, x, y, width, height); } @Override - public boolean validChar(char c, int key) { - if (getCursorPosition() == 0 && key == 12) // minus first allowed. - return true; - return super.validChar(c, key); + public boolean textboxKeyTyped(char c, int key) { + int tValue = 0; + + if(!super.textboxKeyTyped(c, key)) + return false; + + int cursorPos = this.getCursorPosition(); + + String tText = getText().trim(); + if (tText.length() > 0) { + try { + tValue = Integer.parseInt(tText); + } catch (NumberFormatException ignored) {} + + if (tValue > MAX_CHANNEL) + setText(String.valueOf(MAX_CHANNEL)); + else + setText(String.valueOf(tValue)); + + setCursorPosition(cursorPos); + } + + return true; } } } 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 866102212c..afa79b5993 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java @@ -5,60 +5,73 @@ 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 { +public class GT_Cover_Screen extends GT_CoverBehavior { + @Override public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 20.0F; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return false; } + @Override public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override 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) { return false; } + @Override 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) { 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 b1c0c5c3af..fbf5ccca33 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -13,12 +13,13 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fluids.Fluid; -public class GT_Cover_Shutter - extends GT_CoverBehavior { +public class GT_Cover_Shutter extends GT_CoverBehavior { + @Override 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) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4; if(aCoverVariable <0){aCoverVariable = 3;} @@ -31,42 +32,52 @@ public class GT_Cover_Shutter return aCoverVariable; } + @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } + @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } + @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } + @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } + @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } + @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } + @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } + @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true; + return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 0; } @@ -90,10 +101,10 @@ public class GT_Cover_Shutter private final int coverID; private int coverVariable; - private final static int startX = 10; - private final static int startY = 25; - private final static int spaceX = 18; - private final static int spaceY = 18; + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); @@ -125,6 +136,7 @@ public class GT_Cover_Shutter updateButtons(); } + @Override public void buttonClicked(GuiButton btn){ if (!isEnabled(btn.id)){ coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); 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 f7c7a95ca3..001dc3c023 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -9,14 +9,14 @@ import net.minecraft.item.ItemStack; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -public class GT_Cover_SolarPanel - extends GT_CoverBehavior { +public class GT_Cover_SolarPanel extends GT_CoverBehavior { private final int mVoltage; public GT_Cover_SolarPanel(int aVoltage) { this.mVoltage = aVoltage; } + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if(aSide != 1)return 0; int coverState=aCoverVariable&0x3; @@ -43,7 +43,7 @@ public class GT_Cover_SolarPanel } } } - if (coverState == 1 /*|| (coverState == 2 && aTimer % 8L == 0L)*/) { + if (coverState == 1 ) { aTileEntity.injectEnergyUnits((byte) 6, ((100L-(long)coverNum)*((long)this.mVoltage))/100L, 1L); } @@ -74,10 +74,12 @@ public class GT_Cover_SolarPanel return false; } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java new file mode 100644 index 0000000000..8ac8a0dae9 --- /dev/null +++ b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java @@ -0,0 +1,16 @@ +package gregtech.common.covers; + +import gregtech.api.util.GT_ModHandler; +import net.minecraftforge.fluids.FluidStack; + +public class GT_Cover_SteamValve extends GT_Cover_Pump { + + public GT_Cover_SteamValve(int aTransferRate) { + super(aTransferRate); + } + + @Override + protected boolean canTransferFluid(FluidStack fluid) { + return GT_ModHandler.isAnySteam(fluid); + } +} 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 598188138f..869235e011 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java @@ -5,14 +5,14 @@ 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 { +public class GT_Cover_Vent extends GT_CoverBehavior { private final int mEfficiency; public GT_Cover_Vent(int aEfficiency) { this.mEfficiency = aEfficiency; } + @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aTileEntity instanceof IMachineProgress)) { if ((((IMachineProgress) aTileEntity).hasThingsToDo()) && (aCoverVariable != ((IMachineProgress) aTileEntity).getProgress()) && @@ -24,10 +24,12 @@ public class GT_Cover_Vent return 0; } + @Override public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 100; } 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 814ab3f8fa..b7c87b4860 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -4,6 +4,7 @@ import com.mojang.authlib.GameProfile; import gregtech.api.objects.ItemData; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.Enchantment; @@ -29,8 +30,7 @@ import net.minecraftforge.common.util.FakePlayerFactory; import java.util.List; import java.util.UUID; -public class GT_Entity_Arrow - extends EntityArrow { +public class GT_Entity_Arrow extends EntityArrow { private int mHitBlockX = -1; private int mHitBlockY = -1; private int mHitBlockZ = -1; @@ -62,6 +62,7 @@ public class GT_Entity_Arrow setArrowItem(aStack); } + @Override public void onUpdate() { onEntityUpdate(); if ((this.mArrow == null) && (!this.worldObj.isRemote)) { @@ -242,10 +243,19 @@ public class GT_Entity_Arrow } } } + WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setWorld(this.worldObj); + if (getIsCritical()) { - for (int i = 0; i < 4; i++) { - this.worldObj.spawnParticle("crit", this.posX + this.motionX * i / 4.0D, this.posY + this.motionY * i / 4.0D, this.posZ + this.motionZ * i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); - } + events.setIdentifier("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() + ); } this.posX += this.motionX; this.posY += this.motionY; @@ -267,9 +277,14 @@ public class GT_Entity_Arrow this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F); float tFrictionMultiplier = 0.99F; if (isInWater()) { - for (int l = 0; l < 4; l++) { - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D, this.motionX, this.motionY, this.motionZ); - } + events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ) + .setIdentifier("bubble") + .setPosition( + this.posX - this.motionX * 0.25D, + this.posY - this.motionY * 0.25D, + this.posZ - this.motionZ * 0.25D + ) + .times(4, Runnable::run); tFrictionMultiplier = 0.8F; } if (isWet()) { @@ -284,6 +299,7 @@ public class GT_Entity_Arrow } } + @Override public void writeEntityToNBT(NBTTagCompound aNBT) { super.writeEntityToNBT(aNBT); aNBT.setShort("xTile", (short) this.mHitBlockX); @@ -299,6 +315,7 @@ public class GT_Entity_Arrow aNBT.setTag("mArrow", this.mArrow == null ? null : this.mArrow.writeToNBT(new NBTTagCompound())); } + @Override public void readEntityFromNBT(NBTTagCompound aNBT) { super.readEntityFromNBT(aNBT); this.mHitBlockX = aNBT.getShort("xTile"); @@ -314,6 +331,7 @@ public class GT_Entity_Arrow this.mArrow = GT_Utility.loadItem(aNBT, "mArrow"); } + @Override public void onCollideWithPlayer(EntityPlayer aPlayer) { if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); @@ -327,17 +345,18 @@ public class GT_Entity_Arrow } public ItemStack getArrowItem() { - return GT_Utility.copy(new Object[]{this.mArrow}); + return GT_Utility.copy(this.mArrow); } public void setArrowItem(ItemStack aStack) { - this.mArrow = GT_Utility.updateItemStack(GT_Utility.copyAmount(1L, new Object[]{aStack})); + this.mArrow = GT_Utility.updateItemStack(GT_Utility.copyAmount(1L, aStack)); } public boolean breaksOnImpact() { return false; } + @Override public void setKnockbackStrength(int aKnockback) { this.mKnockback = aKnockback; } 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 d026f8184b..ccf645bf1c 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 @@ -7,8 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -public class GT_Entity_Arrow_Potion - extends GT_Entity_Arrow { +public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { private int[] mPotions = new int[0]; public GT_Entity_Arrow_Potion(World aWorld) { @@ -23,16 +22,19 @@ public class GT_Entity_Arrow_Potion super(aWorld, aEntity, aSpeed); } + @Override public void writeEntityToNBT(NBTTagCompound aNBT) { super.writeEntityToNBT(aNBT); aNBT.setIntArray("mPotions", this.mPotions); } + @Override public void readEntityFromNBT(NBTTagCompound aNBT) { super.readEntityFromNBT(aNBT); setPotions(aNBT.getIntArray("mPotions")); } + @Override public boolean breaksOnImpact() { return true; } @@ -47,6 +49,7 @@ public class GT_Entity_Arrow_Potion } } + @Override 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) { diff --git a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java index 70c4fc7b5b..f8c784fb70 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java @@ -9,10 +9,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; -import java.util.Iterator; - -public class GT_Container_Boiler - extends GT_ContainerMetaTile_Machine { +public class GT_Container_Boiler extends GT_ContainerMetaTile_Machine { private int mSteamCapacity = 0;//FB: UR - UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR public int mWaterAmount = 0; public int mSteamAmount = 0; @@ -23,6 +20,7 @@ public class GT_Container_Boiler this.mSteamCapacity = aSteamCapacity; } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); @@ -30,14 +28,17 @@ public class GT_Container_Boiler addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); } + @Override public int getSlotCount() { return 4; } + @Override public int getShiftClickSlotCount() { return 1; } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { @@ -53,9 +54,8 @@ public class GT_Container_Boiler this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / 15900)); this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); + for (Object crafter : this.crafters) { + ICrafting var1 = (ICrafting) crafter; var1.sendProgressBarUpdate(this, 100, this.mTemperature); var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); @@ -63,6 +63,7 @@ public class GT_Container_Boiler } } + @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int par1, int par2) { super.updateProgressBar(par1, par2); diff --git a/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java index 41e63a78ec..ac2f18f561 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_Container_BronzeBlastFurnace.java @@ -6,12 +6,12 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; -public class GT_Container_BronzeBlastFurnace - extends GT_ContainerMetaTile_Machine { +public class GT_Container_BronzeBlastFurnace extends GT_ContainerMetaTile_Machine { public GT_Container_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); @@ -19,10 +19,12 @@ public class GT_Container_BronzeBlastFurnace addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); } + @Override public int getSlotCount() { return 4; } + @Override public int getShiftClickSlotCount() { return 2; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java index d465134d5e..64731c652f 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java @@ -10,12 +10,12 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class GT_Container_ChestBuffer - extends GT_ContainerMetaTile_Machine { +public class GT_Container_ChestBuffer extends GT_ContainerMetaTile_Machine { public GT_Container_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { @@ -28,6 +28,7 @@ public class GT_Container_ChestBuffer addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 62, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 27) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -77,10 +78,12 @@ public class GT_Container_ChestBuffer return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public int getSlotCount() { return 27; } + @Override public int getShiftClickSlotCount() { return 27; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Filter.java b/src/main/java/gregtech/common/gui/GT_Container_Filter.java index bfe8578623..cc3efaefb7 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Filter.java @@ -10,12 +10,12 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class GT_Container_Filter - extends GT_ContainerMetaTile_Machine { +public class GT_Container_Filter extends GT_ContainerMetaTile_Machine { public GT_Container_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5)); addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5)); @@ -44,6 +44,7 @@ public class GT_Container_Filter addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 80, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 9) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -117,10 +118,12 @@ public class GT_Container_Filter return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public int getSlotCount() { return 9; } + @Override public int getShiftClickSlotCount() { return 9; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java index f0acb3ed97..0ee3cc1d44 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java @@ -10,12 +10,12 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class GT_Container_ItemDistributor - extends GT_ContainerMetaTile_Machine { +public class GT_Container_ItemDistributor extends GT_ContainerMetaTile_Machine { public GT_Container_ItemDistributor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { @@ -27,6 +27,7 @@ public class GT_Container_ItemDistributor addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 27) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -67,11 +68,13 @@ public class GT_Container_ItemDistributor return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public int getSlotCount() { return 27; } + @Override public int getShiftClickSlotCount() { return 27; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java index 3bd32c24a2..0e5cc35e02 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java @@ -12,10 +12,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import java.util.Iterator; - -public class GT_Container_MicrowaveEnergyTransmitter - extends GT_ContainerMetaTile_Machine { +public class GT_Container_MicrowaveEnergyTransmitter extends GT_ContainerMetaTile_Machine { public int mEgg = 0; public int mTargetD = 0; public int mTargetZ = 0; @@ -121,9 +118,8 @@ public class GT_Container_MicrowaveEnergyTransmitter this.mTargetD = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD; this.mEgg = (((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).hasDimensionalTeleportCapability() ? 1 : 0); - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); + for (Object crafter : this.crafters) { + ICrafting var1 = (ICrafting) crafter; var1.sendProgressBarUpdate(this, 100, this.mTargetX & 0xFFFF); var1.sendProgressBarUpdate(this, 101, this.mTargetX >>> 16); var1.sendProgressBarUpdate(this, 102, this.mTargetY & 0xFFFF); @@ -136,6 +132,7 @@ public class GT_Container_MicrowaveEnergyTransmitter } } + @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int par1, int par2) { super.updateProgressBar(par1, par2); diff --git a/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java index 5ef8441027..7aebadf31e 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java @@ -13,6 +13,7 @@ public class GT_Container_PrimitiveBlastFurnace extends GT_ContainerMetaTile_Mac super(inventoryPlayer, tileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { for (int i = 0; i < GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS; i++) { addSlotToContainer(new Slot(this.mTileEntity, i, 34, 16 + 18 * i)); @@ -22,12 +23,14 @@ public class GT_Container_PrimitiveBlastFurnace extends GT_ContainerMetaTile_Mac } } + @Override public int getSlotCount() { return GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS + GT_MetaTileEntity_PrimitiveBlastFurnace.OUTPUT_SLOTS; } + @Override public int getShiftClickSlotCount() { return GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_QuantumChest.java b/src/main/java/gregtech/common/gui/GT_Container_QuantumChest.java index c63c8fda89..c50bb5ce52 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_QuantumChest.java +++ b/src/main/java/gregtech/common/gui/GT_Container_QuantumChest.java @@ -12,8 +12,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; -import java.util.Iterator; - public class GT_Container_QuantumChest extends GT_ContainerMetaTile_Machine { public int mContent = 0; @@ -42,9 +40,8 @@ public class GT_Container_QuantumChest extends GT_ContainerMetaTile_Machine { mContent = 0; } - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); + for (Object crafter : this.crafters) { + ICrafting var1 = (ICrafting) crafter; var1.sendProgressBarUpdate(this, 100, mContent & 65535); var1.sendProgressBarUpdate(this, 101, mContent >>> 16); } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java index ecd371893d..f432c9b5d5 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java @@ -13,16 +13,14 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import java.util.Iterator; - -public class GT_Container_Regulator - extends GT_ContainerMetaTile_Machine { +public class GT_Container_Regulator extends GT_ContainerMetaTile_Machine { public int[] mTargetSlots = {0, 0, 0, 0, 0, 0, 0, 0, 0}; public GT_Container_Regulator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { this.mTargetSlots = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -61,6 +59,7 @@ public class GT_Container_Regulator addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 18, 8, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 10) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -106,6 +105,7 @@ public class GT_Container_Regulator return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { @@ -115,15 +115,15 @@ public class GT_Container_Regulator for (int i = 0; i < 9; i++) { this.mTargetSlots[i] = ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[i]; } - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); + for (Object crafter : this.crafters) { + ICrafting var1 = (ICrafting) crafter; for (int i = 0; i < 9; i++) { var1.sendProgressBarUpdate(this, 100 + i, this.mTargetSlots[i]); } } } + @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int par1, int par2) { super.updateProgressBar(par1, par2); @@ -157,10 +157,12 @@ public class GT_Container_Regulator } } + @Override public int getSlotCount() { return 10; } + @Override public int getShiftClickSlotCount() { return 10; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java index 530e64aa68..0b61a0910d 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java @@ -10,12 +10,12 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class GT_Container_SuperBuffer - extends GT_ContainerMetaTile_Machine { +public class GT_Container_SuperBuffer extends GT_ContainerMetaTile_Machine { public GT_Container_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 8, 63, false, true, 1)); addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 26, 63, false, true, 1)); @@ -23,6 +23,7 @@ public class GT_Container_SuperBuffer addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 256, 62, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 0) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -72,10 +73,12 @@ public class GT_Container_SuperBuffer return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public int getSlotCount() { return 0; } + @Override public int getShiftClickSlotCount() { return 0; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java b/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java index f655c2d2bf..2337a21c12 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java @@ -14,8 +14,7 @@ import net.minecraft.item.ItemStack; import java.util.Iterator; -public class GT_Container_Teleporter - extends GT_ContainerMetaTile_Machine { +public class GT_Container_Teleporter extends GT_ContainerMetaTile_Machine { public int mEgg = 0; public int mTargetD = 0; public int mTargetZ = 0; @@ -136,6 +135,7 @@ public class GT_Container_Teleporter } } + @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int par1, int par2) { super.updateProgressBar(par1, par2); diff --git a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java index 59c6edfeea..762a9868bf 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java @@ -11,12 +11,12 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class GT_Container_TypeFilter - extends GT_ContainerMetaTile_Machine { +public class GT_Container_TypeFilter extends GT_ContainerMetaTile_Machine { public GT_Container_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new Slot(this.mTileEntity, 0, 98, 5)); addSlotToContainer(new Slot(this.mTileEntity, 1, 116, 5)); @@ -37,6 +37,7 @@ public class GT_Container_TypeFilter addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 10, 80, 63, false, true, 1)); } + @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (aSlotIndex < 9) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -99,10 +100,12 @@ public class GT_Container_TypeFilter return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } + @Override public int getSlotCount() { return 9; } + @Override public int getShiftClickSlotCount() { return 9; } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java b/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java index 779fced498..6d346fc445 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java @@ -38,6 +38,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { this.container = container; } + @Override public void initGui() { super.initGui(); @@ -65,6 +66,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } + @Override protected final void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(BACKGROUND); @@ -81,6 +83,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } + @Override protected void keyTyped(char character, int key) { if (!checkHotbarKeys(key)) { if (key == 28) @@ -104,7 +107,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { amount.setText("1"); } - } catch (NumberFormatException localNumberFormatException) { + } catch (NumberFormatException ignored) { } } else { super.keyTyped(character, key); @@ -112,6 +115,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } } + @Override protected void actionPerformed(GuiButton btn) { try { if (btn == apply) { @@ -159,7 +163,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { out = Long.toString(result); Integer.parseInt(out); amount.setText(out); - } catch (NumberFormatException localNumberFormatException) { + } catch (NumberFormatException ignored) { } } @@ -168,7 +172,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { try { DecimalFormat df = new DecimalFormat("+#;-#"); return df.parse(btn.displayString).intValue(); - } catch (ParseException e) { + } catch (ParseException ignored) { } return 0; @@ -187,6 +191,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } + @Override public void writeText(String selectedText) { String original = getText(); super.writeText(selectedText); @@ -204,6 +209,7 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } + @Override public void setText(String s) { try { int i = Integer.parseInt(s); @@ -219,4 +225,4 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java index 459fc32388..45406faec7 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java @@ -4,16 +4,17 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_Boiler - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_Boiler extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName, int aSteamCapacity) { super(new GT_Container_Boiler(aInventoryPlayer, aTileEntity, aSteamCapacity), "gregtech:textures/gui/" + aTextureName); } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString("Boiler", 8, 4, 4210752); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java index 187ca93de0..a43de53e2f 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java @@ -4,16 +4,17 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_BronzeBlastFurnace - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_BronzeBlastFurnace extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BronzeBlastFurnace.png"); } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString("Bronze Blast Furnace", 8, 4, 4210752); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java index 1081badc51..149f120771 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_ChestBuffer.java @@ -4,12 +4,12 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_ChestBuffer - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_ChestBuffer extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_ChestBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/ChestBuffer.png"); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java index 9ca7cc413b..20a8f59894 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Filter.java @@ -4,12 +4,12 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_Filter - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_Filter extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_Filter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Filter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Filter.png"); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java index 8ee028b53d..c1efb6ab58 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -56,4 +56,4 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi drawTexturedModalRect(x + 5, y + 156, 0, 251, Math.min(147, (int) (tScale * 148)), 5); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java index 637d4abfa1..ca94379c5a 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java @@ -4,16 +4,16 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_ItemDistributor - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_ItemDistributor extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_ItemDistributor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_ItemDistributor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/ItemDistributor.png"); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java index 7e5e43dbc7..db27fb8016 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java @@ -7,12 +7,12 @@ import net.minecraft.entity.player.InventoryPlayer; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; -public class GT_GUIContainer_MicrowaveEnergyTransmitter - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_MicrowaveEnergyTransmitter extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_MicrowaveEnergyTransmitter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255); if (this.mContainer != null) { @@ -26,6 +26,7 @@ public class GT_GUIContainer_MicrowaveEnergyTransmitter } } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java index 2817c32192..5f93197f05 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java @@ -4,8 +4,7 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine { - private String name; +public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine { private String name; public String mNEI; public GT_GUIContainer_PrimitiveBlastFurnace(InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity, String name, String aNEI) { @@ -15,10 +14,12 @@ public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTi this.mNEI = aNEI; } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString(name, 8, 4, 4210752); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; @@ -26,7 +27,7 @@ public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTi drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) { drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (1) - + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), + + this.mContainer.mProgressTime * 20 / (Math.max(this.mContainer.mMaxProgressTime, 1)))), 11); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java index 8adee5fbe0..9a237a517f 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java @@ -4,12 +4,12 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_Regulator - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_Regulator extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_Regulator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Regulator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Regulator.png"); } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, 16448255); this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, 16448255); @@ -22,6 +22,7 @@ public class GT_GUIContainer_Regulator this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, 16448255); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java index 43d279ca0e..f4cb165cf9 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_SuperBuffer.java @@ -4,12 +4,12 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_SuperBuffer - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_SuperBuffer extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_SuperBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_SuperBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/SuperBuffer.png"); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java index 5f89f60e49..8c02897738 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java @@ -7,12 +7,12 @@ import net.minecraft.entity.player.InventoryPlayer; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; -public class GT_GUIContainer_Teleporter - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_Teleporter extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Teleporter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255); if (this.mContainer != null) { @@ -26,6 +26,7 @@ public class GT_GUIContainer_Teleporter } } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java index b2fb51c242..d312c0b76a 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_TypeFilter.java @@ -4,12 +4,12 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_TypeFilter - extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_TypeFilter extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_TypeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_TypeFilter(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/TypeFilter.png"); } + @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); int x = (this.width - this.xSize) / 2; diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index 6f7ea9141d..34c3872edf 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -103,7 +103,7 @@ public enum CombType { DOB("d-o-b", true, Materials._NULL, 50,0x007700, 0x002400), THORIUM("thorium", true, Materials.Thorium, 75,0x001E00, 0x005000), LUTETIUM("lutetium", true, Materials.Lutetium, 10,0xE6FFE6, 0xFFFFFF), - AMERICUM("americum", true, Materials.Americium, 5,0xE6E6FF, 0xC8C8C8), + AMERICIUM("americium", true, Materials.Americium, 5,0xE6E6FF, 0xC8C8C8), NEUTRONIUM("neutronium", true, Materials.Neutronium, 2,0xFFF0F0, 0xFAFAFA), //Twilight @@ -181,11 +181,11 @@ public enum CombType { } public String getName() { -// return "gt.comb."+this.name; + return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } public int[] getColours() { return color == null || color.length != 2 ? new int[]{0,0} : color; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/DropType.java b/src/main/java/gregtech/common/items/DropType.java index 1316b01601..f3ea945016 100644 --- a/src/main/java/gregtech/common/items/DropType.java +++ b/src/main/java/gregtech/common/items/DropType.java @@ -40,11 +40,11 @@ public enum DropType { } public String getName() { -// return "gt.comb."+this.name; + return GT_LanguageManager.addStringLocalization("drop." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Drop"); } public int[] getColours() { return colours[this.ordinal()]; } -}
\ No newline at end of file +} 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 9d23d09587..056ab796fa 100644 --- a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java +++ b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java @@ -10,29 +10,36 @@ public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { super(aUnlocalized, aEnglish, 1, 1, 0, aRadiation, 0, null, false); } + @Override 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) { return false; } + @Override public boolean canStoreHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2) { return false; } + @Override public int getMaxHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2) { return 0; } + @Override public int getCurrentHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2) { return 0; } + @Override public int alterHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, int paramInt3) { return 0; } + @Override public float influenceExplosion(IReactor paramIReactor, ItemStack paramItemStack) { return 0.0F; } diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index ba50f99d2e..a8487651b4 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -28,6 +28,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { ItemList.Display_Fluid.set(this); } + @Override protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { NBTTagCompound aNBT = aStack.getTagCompound(); if (GT_Values.D1) { @@ -46,10 +47,12 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { } } + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aIconRegister) { } + @Override public IIcon getIconFromDamage(int aMeta) { return Stream.of(FluidRegistry.getFluid(aMeta), FluidRegistry.WATER) .filter(Objects::nonNull) @@ -59,16 +62,19 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { .orElseThrow(IllegalStateException::new); } + @Override @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack aStack, int aRenderPass) { Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage()); return tFluid == null ? 16777215 : tFluid.getColor(); } + @Override public int getSpriteNumber() { return 0; } + @Override public String getUnlocalizedName(ItemStack aStack) { if (aStack != null) { return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), false); @@ -76,6 +82,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { return ""; } + @Override public String getItemStackDisplayName(ItemStack aStack) { if (aStack != null) { return GT_Utility.getFluidName(FluidRegistry.getFluid(aStack.getItemDamage()), true); @@ -83,6 +90,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { return ""; } + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item aItem, CreativeTabs aTab, List aList) { if (GT_Values.D1) { 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 710dc0bf8f..9cbdb2b832 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -24,7 +24,7 @@ import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; public class GT_IntegratedCircuit_Item extends GT_Generic_Item { - private final static String aTextEmptyRow = " "; + private static final String aTextEmptyRow = " "; protected IIcon[] mIconDamage = new IIcon[25]; public GT_IntegratedCircuit_Item() { super("integrated_circuit", "Programmed Circuit", ""); @@ -83,15 +83,18 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item { return getModeString(aMetaData) + " " + (byte) (aMetaData & 0xFF); } + @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".configuration").toString(), "Configuration: ") + getConfigurationString(getDamage(aStack))); } + @Override public String getUnlocalizedName(ItemStack aStack) { return getUnlocalizedName(); } + @Override @SideOnly(Side.CLIENT) public final void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) { aList.add(new ItemStack(this, 1, 0)); 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 ad2457b721..f0904485d4 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,18 +2,37 @@ package gregtech.common.items; import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.Dyes; +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.SubTag; +import gregtech.api.enums.TC_Aspects; import gregtech.api.interfaces.IItemBehaviour; -import gregtech.api.interfaces.ITexture; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Item_X32; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; -import gregtech.api.util.*; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_FoodStat; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import gregtech.common.covers.*; -import gregtech.common.items.behaviors.*; +import gregtech.common.items.behaviors.Behaviour_Arrow_Potion; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import gregtech.common.items.behaviors.Behaviour_DataStick; +import gregtech.common.items.behaviors.Behaviour_Lighter; +import gregtech.common.items.behaviors.Behaviour_PrintedPages; +import gregtech.common.items.behaviors.Behaviour_Scanner; +import gregtech.common.items.behaviors.Behaviour_SensorKit; +import gregtech.common.items.behaviors.Behaviour_Sonictron; +import gregtech.common.items.behaviors.Behaviour_Spray_Color; +import gregtech.common.items.behaviors.Behaviour_WrittenBook; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.item.EntityItem; @@ -25,16 +44,23 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.util.MathHelper; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static gregtech.api.enums.Textures.BlockIcons.*; public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_01 INSTANCE; private final String mToolTipPurify = GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust"); - private final static String aTextArrow = " A";private final static String aTextStick = " S ";private final static String aTextFeather = "F "; - private final static String aTextEmptyRow = " "; private final static String aTextShape = " P "; + private static final String aTextArrow = " A"; + private static final String aTextStick = " S "; + private static final String aTextFeather = "F "; + private static final String aTextEmptyRow = " "; private static final String aTextShape = " P "; public GT_MetaGenerated_Item_01() { - super("metaitem.01", new OrePrefixes[]{OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma}); + super("metaitem.01", OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma); INSTANCE = this; int tLastID = 0; @@ -42,536 +68,507 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600); GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); - GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE), null); + GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), TextureFactory.of(COVER_WOOD_PLATE), null); ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID); tStack.setStackDisplayName("The holy Planks of Sengir"); GT_Utility.ItemNBT.addEnchantment(tStack, Enchantment.smite, 10); GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', new ItemStack(Blocks.dragon_egg, 1, 32767)}); - ItemList.Credit_Greg_Copper.set(addItem(tLastID = 0, "Copper GT Credit", "0.125 Credits", new Object[0])); - ItemList.Credit_Greg_Cupronickel.set(addItem(tLastID = 1, "Cupronickel GT Credit", "1 Credit", new Object[]{new ItemData(Materials.Cupronickel, 907200L, new MaterialStack[0])})); - ItemList.Credit_Greg_Silver.set(addItem(tLastID = 2, "Silver GT Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); - ItemList.Credit_Greg_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits", new Object[0])); - ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits", new Object[0])); - ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4096 Credits", new Object[0])); - ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32768 Credits", new Object[0])); - ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262144 Credits", new Object[0])); - ItemList.Coin_Gold_Ancient.set(addItem(tLastID = 8, "Ancient Gold Coin", "Found in ancient Ruins", new Object[]{new ItemData(Materials.Gold, 907200L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Brass, 907200L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); - ItemList.Coin_Chocolate.set(addItem(tLastID = 10, "Chocolate Coin", "Wrapped in Gold", new Object[]{new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount, new MaterialStack[0]), new GT_FoodStat(1, 0.1F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), true, false, false, new int[]{Potion.moveSpeed.id, 200, 1, 100})})); - ItemList.Credit_Copper.set(addItem(tLastID = 11, "Industrial Copper Credit", "0.125 Credits", new Object[0])); - - ItemList.Credit_Silver.set(addItem(tLastID = 13, "Industrial Silver Credit", "8 Credits", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)})); - ItemList.Credit_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits", new Object[0])); - ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits", new Object[0])); - ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits", new Object[0])); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L, new Object[0]), 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, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Osmium}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Copper.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(8L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Neutronium}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(1L, new Object[0]), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Neutronium.get(1L, new Object[0]), 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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); + ItemList.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_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits")); + ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits")); + ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4096 Credits")); + ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32768 Credits")); + ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262144 Credits")); + ItemList.Coin_Gold_Ancient.set(addItem(tLastID = 8, "Ancient Gold Coin", "Found in ancient Ruins", new ItemData(Materials.Gold, 907200L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L))); + ItemList.Coin_Doge.set(addItem(tLastID = 9, "Doge Coin", "wow much coin how money so crypto plz mine v rich very currency wow", new ItemData(Materials.Brass, 907200L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Coin_Chocolate.set(addItem(tLastID = 10, "Chocolate Coin", "Wrapped in Gold", new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount), new GT_FoodStat(1, 0.1F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), true, false, false, Potion.moveSpeed.id, 200, 1, 100))); + ItemList.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_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits")); + ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits")); + ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits")); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L), new Object[]{OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold)}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Copper.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Osmium}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Osmium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Copper.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Neutronium}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Neutronium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah}); + + ItemList.Component_Minecart_Wheels_Iron.set(addItem(tLastID = 100, "Iron Minecart Wheels", "To get things rolling", new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + ItemList.Component_Minecart_Wheels_Steel.set(addItem(tLastID = 101, "Steel Minecart Wheels", "To get things rolling", new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Iron.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); 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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[0]), 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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10, new int[0]), 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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[0]), 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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, new int[]{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 Object[]{new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10, new int[0]), 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, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L, new Object[0]), 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 Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)})); + ItemList.Arrow_Head_Glass_Emtpy.set(addItem(tLastID = 200, "Empty Glass Arrow Head", "Fill with Potions before use", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Head_Glass_Poison.set(addItem(tLastID = 201, "Poison Glass Arrow Head", "Glass Arrow filled with Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Poison_Long.set(addItem(tLastID = 202, "Poison Glass Arrow Head", "Glass Arrow filled with stretched Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Poison_Strong.set(addItem(tLastID = 203, "Poison Glass Arrow Head", "Glass Arrow filled with strong Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Slowness.set(addItem(tLastID = 204, "Slowness Glass Arrow Head", "Glass Arrow filled with Laming Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Slowness_Long.set(addItem(tLastID = 205, "Slowness Glass Arrow Head", "Glass Arrow filled with stretched Laming Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Weakness.set(addItem(tLastID = 206, "Weakness Glass Arrow Head", "Glass Arrow filled with Weakening Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Weakness_Long.set(addItem(tLastID = 207, "Weakness Glass Arrow Head", "Glass Arrow filled with stretched Weakening Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Holy_Water.set(addItem(tLastID = 208, "Holy Water Glass Arrow Head", "Glass Arrow filled with Holy Water", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + ItemList.Arrow_Wooden_Glass_Emtpy.set(addItem(tLastID = 225, "Regular Glass Vial Arrow", "Empty Glass Arrow", new Behaviour_Arrow_Potion(1.0F, 6.0F), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Wooden_Glass_Poison.set(addItem(tLastID = 226, "Regular Poison Arrow", "Glass Arrow filled with Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Poison_Long.set(addItem(tLastID = 227, "Regular Poison Arrow", "Glass Arrow filled with stretched Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Poison_Strong.set(addItem(tLastID = 228, "Regular Poison Arrow", "Glass Arrow filled with strong Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Slowness.set(addItem(tLastID = 229, "Regular Slowness Arrow", "Glass Arrow filled with Laming Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Slowness_Long.set(addItem(tLastID = 230, "Regular Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Weakness.set(addItem(tLastID = 231, "Regular Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Weakness_Long.set(addItem(tLastID = 232, "Regular Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Holy_Water.set(addItem(tLastID = 233, "Regular Holy Water Arrow", "Glass Arrow filled with Holy Water", new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + ItemList.Arrow_Plastic_Glass_Emtpy.set(addItem(tLastID = 250, "Light Glass Vial Arrow", "Empty Glass Arrow", new Behaviour_Arrow_Potion(1.5F, 6.0F), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Plastic_Glass_Poison.set(addItem(tLastID = 251, "Light Poison Arrow", "Glass Arrow filled with Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Poison_Long.set(addItem(tLastID = 252, "Light Poison Arrow", "Glass Arrow filled with stretched Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Poison_Strong.set(addItem(tLastID = 253, "Light Poison Arrow", "Glass Arrow filled with strong Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Slowness.set(addItem(tLastID = 254, "Light Slowness Arrow", "Glass Arrow filled with Laming Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Slowness_Long.set(addItem(tLastID = 255, "Light Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Weakness.set(addItem(tLastID = 256, "Light Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Weakness_Long.set(addItem(tLastID = 257, "Light Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Holy_Water.set(addItem(tLastID = 258, "Light Holy Water Arrow", "Glass Arrow filled with Holy Water", new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Emtpy.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Emtpy.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); + + ItemList.Shape_Empty.set(addItem(tLastID = 300, "Empty Shape Plate", "Raw Plate to make Molds and Extruder Shapes", new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", 'P', OrePrefixes.plate.get(Materials.Steel)}); - ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates", new Object[0])); - ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings", new Object[0])); - ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears", new Object[0])); - ItemList.Shape_Mold_Credit.set(addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)", new Object[0])); - ItemList.Shape_Mold_Bottle.set(addItem(tLastID = 305, "Mold (Bottle)", "Mold for making Bottles", new Object[0])); - ItemList.Shape_Mold_Ingot.set(addItem(tLastID = 306, "Mold (Ingot)", "Mold for making Ingots", new Object[0])); - ItemList.Shape_Mold_Ball.set(addItem(tLastID = 307, "Mold (Ball)", "Mold for making Balls", new Object[0])); - ItemList.Shape_Mold_Block.set(addItem(tLastID = 308, "Mold (Block)", "Mold for making Blocks", new Object[0])); - ItemList.Shape_Mold_Nugget.set(addItem(tLastID = 309, "Mold (Nuggets)", "Mold for making Nuggets", new Object[0])); - ItemList.Shape_Mold_Bun.set(addItem(tLastID = 310, "Mold (Buns)", "Mold for shaping Buns", new Object[0])); - ItemList.Shape_Mold_Bread.set(addItem(tLastID = 311, "Mold (Bread)", "Mold for shaping Breads", new Object[0])); - ItemList.Shape_Mold_Baguette.set(addItem(tLastID = 312, "Mold (Baguette)", "Mold for shaping Baguettes", new Object[0])); - ItemList.Shape_Mold_Cylinder.set(addItem(tLastID = 313, "Mold (Cylinder)", "Mold for shaping Cylinders", new Object[0])); - ItemList.Shape_Mold_Anvil.set(addItem(tLastID = 314, "Mold (Anvil)", "Mold for shaping Anvils", new Object[0])); - ItemList.Shape_Mold_Name.set(addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)", new Object[0])); - ItemList.Shape_Mold_Arrow.set(addItem(tLastID = 316, "Mold (Arrow Head)", "Mold for making Arrow Heads", new Object[0])); - ItemList.Shape_Mold_Gear_Small.set(addItem(tLastID = 317, "Mold (Small Gear)", "Mold for making small Gears", new Object[0])); - ItemList.Shape_Mold_Rod.set(addItem(tLastID = 318, "Mold (Rod)", "Mold for making Rods", new Object[0])); - ItemList.Shape_Mold_Bolt.set(addItem(tLastID = 319, "Mold (Bolt)", "Mold for making Bolts", new Object[0])); - ItemList.Shape_Mold_Round.set(addItem(tLastID = 320, "Mold (Round)", "Mold for making Rounds", new Object[0])); - ItemList.Shape_Mold_Screw.set(addItem(tLastID = 321, "Mold (Screw)", "Mold for making Screws", new Object[0])); - ItemList.Shape_Mold_Ring.set(addItem(tLastID = 322, "Mold (Ring)", "Mold for making Rings", new Object[0])); - ItemList.Shape_Mold_Rod_Long.set(addItem(tLastID = 323, "Mold (Long Rod)", "Mold for making Long Rods", new Object[0])); - ItemList.Shape_Mold_Rotor.set(addItem(tLastID = 324, "Mold (Rotor)", "Mold for making a Rotor", new Object[0])); - ItemList.Shape_Mold_Turbine_Blade.set(addItem(tLastID = 325, "Mold (Turbine Blade)", "Mold for making a Turbine Blade", new Object[0])); - ItemList.Shape_Mold_Pipe_Tiny.set(addItem(tLastID = 326, "Mold (Tiny Pipe)", "Mold for making tiny Pipes", new Object[0])); - ItemList.Shape_Mold_Pipe_Small.set(addItem(tLastID = 327, "Mold (Small Pipe)", "Mold for making small Pipes", new Object[0])); - ItemList.Shape_Mold_Pipe_Medium.set(addItem(tLastID = 328, "Mold (Normal Pipe)", "Mold for making Pipes", new Object[0])); - ItemList.Shape_Mold_Pipe_Large.set(addItem(tLastID = 329, "Mold (Large Pipe)", "Mold for making large Pipes", new Object[0])); - ItemList.Shape_Mold_Pipe_Huge.set(addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes", new Object[0])); - GT_ModHandler.removeRecipe(new ItemStack[]{new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)}); - - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Credit.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Ph", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " h ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Ball.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "h ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "hP ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Nugget.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P h", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bun.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " h", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Bread.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Baguette.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Cylinder.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Anvil.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " h ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Name.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "h ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Arrow.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "h ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Mold_Gear_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "h P", 'P', ItemList.Shape_Empty}); - - ItemList.Shape_Extruder_Plate.set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates", new Object[0])); - ItemList.Shape_Extruder_Rod.set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods", new Object[0])); - ItemList.Shape_Extruder_Bolt.set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts", new Object[0])); - ItemList.Shape_Extruder_Ring.set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings", new Object[0])); - ItemList.Shape_Extruder_Cell.set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells", new Object[0])); - ItemList.Shape_Extruder_Ingot.set(addItem(tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?", new Object[0])); - ItemList.Shape_Extruder_Wire.set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires", new Object[0])); - ItemList.Shape_Extruder_Casing.set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings", new Object[0])); - ItemList.Shape_Extruder_Pipe_Tiny.set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes", new Object[0])); - ItemList.Shape_Extruder_Pipe_Small.set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes", new Object[0])); - ItemList.Shape_Extruder_Pipe_Medium.set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes", new Object[0])); - ItemList.Shape_Extruder_Pipe_Large.set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes", new Object[0])); - ItemList.Shape_Extruder_Pipe_Huge.set(addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes", new Object[0])); - ItemList.Shape_Extruder_Block.set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks", new Object[0])); - ItemList.Shape_Extruder_Sword.set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords", new Object[0])); - ItemList.Shape_Extruder_Pickaxe.set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes", new Object[0])); - ItemList.Shape_Extruder_Shovel.set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels", new Object[0])); - ItemList.Shape_Extruder_Axe.set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes", new Object[0])); - ItemList.Shape_Extruder_Hoe.set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes", new Object[0])); - ItemList.Shape_Extruder_Hammer.set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers", new Object[0])); - ItemList.Shape_Extruder_File.set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files", new Object[0])); - ItemList.Shape_Extruder_Saw.set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws", new Object[0])); - ItemList.Shape_Extruder_Gear.set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears", new Object[0])); - ItemList.Shape_Extruder_Bottle.set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles", new Object[0])); - ItemList.Shape_Extruder_Rotor.set(addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor", new Object[0])); - ItemList.Shape_Extruder_Small_Gear.set(addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear", new Object[0])); - ItemList.Shape_Extruder_Turbine_Blade.set(addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade", new Object[0])); - - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bolt.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Cell.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ingot.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextShape, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Ring.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " Px", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Rod.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Wire.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, " x ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Casing.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextShape, "x ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Plate.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "xP ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Block.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P x", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Small.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", " x", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Large.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Medium.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P ", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Sword.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pickaxe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, " x ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Shovel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", aTextEmptyRow, "x ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Axe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" P", "x ", aTextEmptyRow, 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hoe.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, aTextEmptyRow, "x P", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Hammer.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, "x ", " P", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_File.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Saw.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, " P", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Gear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Tiny.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x ", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Pipe_Huge.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" x", aTextEmptyRow, "P ", 'P', ItemList.Shape_Empty}); - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Extruder_Bottle.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextEmptyRow, " x", "P ", 'P', ItemList.Shape_Empty}); - - ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat", new Object[0])); - ItemList.Shape_Slicer_Stripes.set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes", new Object[0])); - - GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Flat.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Stripes.get(1L, new Object[0]), 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 Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), 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, new Object[0]), 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 Object[]{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(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), ItemList.Spray_Empty.get(1L, new Object[0]), 800, 1); - - ItemList.Crate_Empty.set(addItem(tLastID = 403, "Empty Crate", "To Package lots of Material", new Object[]{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, new Object[0]), 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, new Object[0]), 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 Object[]{new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), 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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 800, 1); - - ItemList.Large_Fluid_Cell_Steel.set(addItem(tLastID = 405, "Large Steel Fluid Cell", "", new Object[]{new ItemData(Materials.Steel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)})); + ItemList.Shape_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_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")); + ItemList.Shape_Mold_Block.set(addItem(tLastID = 308, "Mold (Block)", "Mold for making Blocks")); + ItemList.Shape_Mold_Nugget.set(addItem(tLastID = 309, "Mold (Nuggets)", "Mold for making Nuggets")); + ItemList.Shape_Mold_Bun.set(addItem(tLastID = 310, "Mold (Buns)", "Mold for shaping Buns")); + ItemList.Shape_Mold_Bread.set(addItem(tLastID = 311, "Mold (Bread)", "Mold for shaping Breads")); + 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_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")); + ItemList.Shape_Mold_Bolt.set(addItem(tLastID = 319, "Mold (Bolt)", "Mold for making Bolts")); + ItemList.Shape_Mold_Round.set(addItem(tLastID = 320, "Mold (Round)", "Mold for making Rounds")); + ItemList.Shape_Mold_Screw.set(addItem(tLastID = 321, "Mold (Screw)", "Mold for making Screws")); + 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_Pipe_Tiny.set(addItem(tLastID = 326, "Mold (Tiny Pipe)", "Mold for making tiny Pipes")); + ItemList.Shape_Mold_Pipe_Small.set(addItem(tLastID = 327, "Mold (Small Pipe)", "Mold for making small Pipes")); + ItemList.Shape_Mold_Pipe_Medium.set(addItem(tLastID = 328, "Mold (Normal Pipe)", "Mold for making Pipes")); + ItemList.Shape_Mold_Pipe_Large.set(addItem(tLastID = 329, "Mold (Large Pipe)", "Mold for making large Pipes")); + ItemList.Shape_Mold_Pipe_Huge.set(addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes")); + GT_ModHandler.removeRecipe(new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)); + + ItemList.Shape_Extruder_Plate.set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates")); + ItemList.Shape_Extruder_Rod.set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods")); + ItemList.Shape_Extruder_Bolt.set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts")); + ItemList.Shape_Extruder_Ring.set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings")); + ItemList.Shape_Extruder_Cell.set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells")); + ItemList.Shape_Extruder_Ingot.set(addItem(tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?")); + ItemList.Shape_Extruder_Wire.set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires")); + ItemList.Shape_Extruder_Casing.set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings")); + ItemList.Shape_Extruder_Pipe_Tiny.set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes")); + ItemList.Shape_Extruder_Pipe_Small.set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes")); + ItemList.Shape_Extruder_Pipe_Medium.set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes")); + ItemList.Shape_Extruder_Pipe_Large.set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes")); + ItemList.Shape_Extruder_Pipe_Huge.set(addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes")); + ItemList.Shape_Extruder_Block.set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks")); + ItemList.Shape_Extruder_Sword.set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords")); + ItemList.Shape_Extruder_Pickaxe.set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes")); + ItemList.Shape_Extruder_Shovel.set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels")); + ItemList.Shape_Extruder_Axe.set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes")); + ItemList.Shape_Extruder_Hoe.set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes")); + ItemList.Shape_Extruder_Hammer.set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers")); + ItemList.Shape_Extruder_File.set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files")); + ItemList.Shape_Extruder_Saw.set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws")); + ItemList.Shape_Extruder_Gear.set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears")); + ItemList.Shape_Extruder_Bottle.set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles")); + ItemList.Shape_Extruder_Rotor.set(addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor")); + ItemList.Shape_Extruder_Small_Gear.set(addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear")); + ItemList.Shape_Extruder_Turbine_Blade.set(addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade")); + + ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat")); + ItemList.Shape_Slicer_Stripes.set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes")); + + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Flat.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Stripes.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); + + ItemList.Fuel_Can_Plastic_Empty.set(addItem(tLastID = 400, "Empty Plastic Fuel Can", "Used to store Fuels", new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + ItemList.Fuel_Can_Plastic_Filled.set(addItem(tLastID = 401, "Plastic Fuel Can", "Burns well in Diesel Generators", new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Fuel_Can_Plastic_Empty.get(7L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic)}); + + ItemList.Spray_Empty.set(addItem(tLastID = 402, "Empty Spray Can", "Used for making Sprays", new ItemData(Materials.Tin, OrePrefixes.plate.mMaterialAmount * 2L, Materials.Redstone, OrePrefixes.dust.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), ItemList.Spray_Empty.get(1L), 800, 1); + + ItemList.Crate_Empty.set(addItem(tLastID = 403, "Empty Crate", "To Package lots of Material", new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.Steel)}); + + ItemList.ThermosCan_Empty.set(addItem(tLastID = 404, "Empty Thermos Can", "Keeping hot things hot and cold things cold", new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), ItemList.ThermosCan_Empty.get(1L), 800, 1); + + ItemList.Large_Fluid_Cell_Steel.set(addItem(tLastID = 405, "Large Steel Fluid Cell", "", new ItemData(Materials.Steel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); setFluidContainerStats(32000 + tLastID, 8000L, 64L); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), ItemList.Large_Fluid_Cell_Steel.get(1L, new Object[0]), 200, 30); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), ItemList.Large_Fluid_Cell_Steel.get(1L), 200, 30); - ItemList.Large_Fluid_Cell_TungstenSteel.set(addItem(tLastID = 406, "Large Tungstensteel Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L, new Object[0]), 200, 480); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), 200, 480); - ItemList.Large_Fluid_Cell_Aluminium.set(addItem(tLastID = 407, "Large Aluminium Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), ItemList.Large_Fluid_Cell_Aluminium.get(1L, new Object[0]), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), ItemList.Large_Fluid_Cell_Aluminium.get(1L), 200, 64); - ItemList.Large_Fluid_Cell_StainlessSteel.set(addItem(tLastID = 408, "Large Stainless Steel Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), ItemList.Large_Fluid_Cell_StainlessSteel.get(1L, new Object[0]), 200, 120); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), 200, 120); - ItemList.Large_Fluid_Cell_Titanium.set(addItem(tLastID = 409, "Large Titanium Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), ItemList.Large_Fluid_Cell_Titanium.get(1L, new Object[0]), 200, 256); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), ItemList.Large_Fluid_Cell_Titanium.get(1L), 200, 256); - ItemList.Large_Fluid_Cell_Chrome.set(addItem(tLastID = 410, "Large Chrome Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), ItemList.Large_Fluid_Cell_Chrome.get(1L, new Object[0]), 200, 1024); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), ItemList.Large_Fluid_Cell_Chrome.get(1L), 200, 1024); - ItemList.Large_Fluid_Cell_Iridium.set(addItem(tLastID = 411, "Large Iridium Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), ItemList.Large_Fluid_Cell_Iridium.get(1L, new Object[0]), 200, 1920); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), ItemList.Large_Fluid_Cell_Iridium.get(1L), 200, 1920); - ItemList.Large_Fluid_Cell_Osmium.set(addItem(tLastID = 412, "Large Osmium Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), ItemList.Large_Fluid_Cell_Osmium.get(1L, new Object[0]), 200, 4096); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), ItemList.Large_Fluid_Cell_Osmium.get(1L), 200, 4096); - ItemList.Large_Fluid_Cell_Neutronium.set(addItem(tLastID = 413, "Large Neutronium Fluid Cell", "", new Object[]{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(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), ItemList.Large_Fluid_Cell_Neutronium.get(1L, new Object[0]), 200, 7680); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), 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 Object[]{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 Object[]{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, new Object[0]), ItemList.SPRAY_CAN_DYES_USED[i].get(1L, new Object[0]), ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), 512L, i); + ItemList.SPRAY_CAN_DYES[i].set(addItem(tLastID = 430 + 2 * i, "Spray Can (" + Dyes.get(i).mName + ")", "Full", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.SPRAY_CAN_DYES_USED[i].set(addItem(tLastID + 1, "Spray Can (" + Dyes.get(i).mName + ")", "Used", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), SubTag.INVISIBLE)); + IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Spray_Color(ItemList.Spray_Empty.get(1L), ItemList.SPRAY_CAN_DYES_USED[i].get(1L), ItemList.SPRAY_CAN_DYES[i].get(1L), 512L, i); addItemBehavior(32000 + tLastID, tBehaviour); addItemBehavior(32001 + tLastID, tBehaviour); } - ItemList.Tool_Matches.set(addItem(tLastID = 471, "Match", "", new Object[]{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 Object[]{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 Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + 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, new Object[0]), ItemList.Tool_Matches.get(1L, new Object[0]), 1L); + 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, new Object[0]), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 16L); + tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_MatchBox_Used.get(1L), ItemList.Tool_MatchBox_Full.get(1L), 16L); addItemBehavior(32472, tBehaviour); addItemBehavior(32473, tBehaviour); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), ItemList.Tool_Matches.get(1L, new Object[0]), 16, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), ItemList.Tool_Matches.get(4L, new Object[0]), 64, 16); - GT_Values.RA.addBoxingRecipe(ItemList.Tool_Matches.get(16L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), 64, 16); - GT_Values.RA.addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L, new Object[0]), ItemList.Tool_Matches.get(16L, new Object[0]), null, 32, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(1L), 16, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), ItemList.Tool_Matches.get(1L), 16, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), ItemList.Tool_Matches.get(4L), 64, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), ItemList.Tool_Matches.get(4L), 64, 16); + GT_Values.RA.addBoxingRecipe(ItemList.Tool_Matches.get(16L), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Tool_MatchBox_Full.get(1L), 64, 16); + GT_Values.RA.addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L), ItemList.Tool_Matches.get(16L), null, 32, 16); - ItemList.Tool_Lighter_Invar_Empty.set(addItem(tLastID = 474, "Lighter (Empty)", "", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)})); + 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, new Object[0]), ItemList.Tool_Lighter_Invar_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Full.get(1L, new Object[0]), 100L); + tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Invar_Empty.get(1L), ItemList.Tool_Lighter_Invar_Used.get(1L), ItemList.Tool_Lighter_Invar_Full.get(1L), 100L); addItemBehavior(32475, tBehaviour); addItemBehavior(32476, tBehaviour); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]), 256, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), new ItemStack(Items.flint, 1), 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 Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), 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, new Object[0]), ItemList.Tool_Lighter_Platinum_Used.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Full.get(1L, new Object[0]), 1000L); + tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Platinum_Empty.get(1L), ItemList.Tool_Lighter_Platinum_Used.get(1L), ItemList.Tool_Lighter_Platinum_Full.get(1L), 1000L); addItemBehavior(32478, tBehaviour); addItemBehavior(32479, tBehaviour); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), 256, 256); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), 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", new Object[0])); - ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2", new Object[0])); - ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3", new Object[0])); + 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 Object[]{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) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); - ItemList.Paper_Printed_Pages.set(addItem(tLastID = 481, "Printed Pages", "Used to make written Books", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new Behaviour_PrintedPages(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); - ItemList.Paper_Magic_Empty.set(addItem(tLastID = 482, "Magic Paper", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), 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", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), 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", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), 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", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L)})); - ItemList.Paper_Punch_Card_Encoded.set(addItem(tLastID = 486, "Punched Card", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); - ItemList.Book_Written_01.set(addItem(tLastID = 487, "Book", "", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "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 Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "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 Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)})); - - ItemList.Schematic.set(addItem(tLastID = 490, "Schematic", "EMPTY", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L)})); - ItemList.Schematic_Crafting.set(addItem(tLastID = 491, "Schematic (Crafting)", "Crafts the Programmed Recipe", new Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.StainlessSteel, 7257600L, new MaterialStack[0]), 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, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_2by2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_3by3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_Dust.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Crafting}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_1by1}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_2by2}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), 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 Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L, new MaterialStack[0]), 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 Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L, new MaterialStack[0]), 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, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "P", "P", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireTin}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireCopper}); - - ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "Reusable", new Object[]{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.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.StainlessSteel, 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.StainlessSteel, 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.StainlessSteel, 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.StainlessSteel, 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.StainlessSteel, 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.StainlessSteel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_1by1.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_2by2.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_3by3.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe(ItemList.Schematic_Dust.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Crafting}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_1by1}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_2by2}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Dust}); + + ItemList.Battery_Hull_LV.set(addItem(500, "Small Battery Hull", "An empty LV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Battery_Hull_MV.set(addItem(501, "Medium Battery Hull", "An empty MV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Battery_Hull_HV.set(addItem(502, "Large Battery Hull", "An empty HV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "P", "P", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireTin}); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireCopper}); + + ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "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))); setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false); - ItemList.Battery_SU_LV_SulfuricAcid.set(addItem(tLastID = 510, "Small Acid Battery", "Single Use", new Object[]{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", 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); - ItemList.Battery_SU_LV_Mercury.set(addItem(tLastID = 511, "Small Mercury Battery", "Single Use", new Object[]{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); - ItemList.Battery_RE_LV_Cadmium.set(addItem(tLastID = 517, "Small Cadmium Battery", "Reusable", new Object[]{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"})); + 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), "calclavia:ADVANCED_BATTERY")); setElectricStats(32000 + tLastID, 75000L, GT_Values.V[1], 1L, -3L, true); - ItemList.Battery_RE_LV_Lithium.set(addItem(tLastID = 518, "Small Lithium Battery", "Reusable", new Object[]{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"})); + 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), "calclavia:ADVANCED_BATTERY")); setElectricStats(32000 + tLastID, 100000L, GT_Values.V[1], 1L, -3L, true); - ItemList.Battery_RE_LV_Sodium.set(addItem(tLastID = 519, "Small Sodium Battery", "Reusable", new Object[]{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"})); + 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); - ItemList.Battery_SU_MV_SulfuricAcid.set(addItem(tLastID = 520, "Medium Acid Battery", "Single Use", new Object[]{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", 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); - ItemList.Battery_SU_MV_Mercury.set(addItem(tLastID = 521, "Medium Mercury Battery", "Single Use", new Object[]{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", 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); - ItemList.Battery_RE_MV_Cadmium.set(addItem(tLastID = 527, "Medium Cadmium Battery", "Reusable", new Object[]{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", 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); - ItemList.Battery_RE_MV_Lithium.set(addItem(tLastID = 528, "Medium Lithium Battery", "Reusable", new Object[]{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", 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); - ItemList.Battery_RE_MV_Sodium.set(addItem(tLastID = 529, "Medium Sodium Battery", "Reusable", new Object[]{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", 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); - ItemList.Battery_SU_HV_SulfuricAcid.set(addItem(tLastID = 530, "Large Acid Battery", "Single Use", new Object[]{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", 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); - ItemList.Battery_SU_HV_Mercury.set(addItem(tLastID = 531, "Large Mercury Battery", "Single Use", new Object[]{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", 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); - ItemList.Battery_RE_HV_Cadmium.set(addItem(tLastID = 537, "Large Cadmium Battery", "Reusable", new Object[]{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", 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); - ItemList.Battery_RE_HV_Lithium.set(addItem(tLastID = 538, "Large Lithium Battery", "Reusable", new Object[]{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", 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); - ItemList.Battery_RE_HV_Sodium.set(addItem(tLastID = 539, "Large Sodium Battery", "Reusable", new Object[]{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", 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); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_SulfuricAcid.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_Mercury.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_LV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_MV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(1L, new Object[0])); - - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0]), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0]), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0]), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0]), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0]), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0]), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0]), null, 1600, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0]), null, 1600, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0]), null, 1600, 2); - - ItemList.Energy_LapotronicOrb.set(addItem(tLastID = 597, "Lapotronic Energy Orb", "Reusable battery", new Object[]{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)})); + 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_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_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)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Sodium.get(1L), ItemList.Battery_Hull_LV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Cadmium.get(1L), ItemList.Battery_Hull_MV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Lithium.get(1L), ItemList.Battery_Hull_MV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_MV_Sodium.get(1L), ItemList.Battery_Hull_MV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Cadmium.get(1L), ItemList.Battery_Hull_HV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Lithium.get(1L), ItemList.Battery_Hull_HV.get(1L)); + GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L), ItemList.Battery_Hull_HV.get(1L)); + + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Cadmium.get(1L), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Lithium.get(1L), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Sodium.get(1L), null, 100, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Cadmium.get(1L), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Lithium.get(1L), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Sodium.get(1L), null, 400, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Cadmium.get(1L), null, 1600, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Lithium.get(1L), null, 1600, 2); + GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Sodium.get(1L), null, 1600, 2); + + ItemList.Energy_LapotronicOrb.set(addItem(tLastID = 597, "Lapotronic Energy Orb", "Reusable battery", 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); - ItemList.ZPM.set(addItem(tLastID = 598, "Zero Point Module", "Single use battery", new Object[]{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", 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); - ItemList.Energy_LapotronicOrb2.set(addItem(tLastID = 599, "Lapotronic Energy Orb Cluster", "Reusable battery", new Object[]{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", 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); - ItemList.ZPM2.set(addItem(tLastID = 605, "Ultimate Battery", "Fill this to win minecraft", new Object[]{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", 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); - ItemList.ZPM3.set(addItem(tLastID = 609, "Really Ultimate Battery", "Fill this to be way older", new Object[]{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", 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); - ItemList.Energy_Module.set(addItem(tLastID = 736, "Energy Module", "Reusable battery", new Object[]{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", 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); - ItemList.Energy_Cluster.set(addItem(tLastID = 737, "Energy Cluster", "Reusable battery", new Object[]{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", 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); - ItemList.Electric_Motor_LV.set(addItem(600, "Electric Motor (LV)", "", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.Electrum), 'C', OrePrefixes.cableGt02.get(Materials.Silver)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_EV.get(1L, new Object[0]), 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.AnnealedCopper), 'C', OrePrefixes.cableGt02.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_IV.get(1L, new Object[0]), 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.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", "640 L/sec (as Cover)", new Object[]{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)", "2560 L/sec (as Cover)", new Object[]{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)", "10240 L/sec (as Cover)", new Object[]{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)", "40.960 L/sec (as Cover)", new Object[]{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)", "163.840 L/sec (as Cover)", new Object[]{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)", "655.360 L/sec (as Cover)", new Object[]{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)", "2.621.440 L/sec (as Cover)", new Object[]{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)", "10.485.760 L/sec (as Cover)", new Object[]{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)", "20.971.520 L/sec (as Cover)", new Object[]{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)", "41.943.040 L/sec (as Cover)", new Object[]{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, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32)); - GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(128)); - GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(512)); - GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2048)); - GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8192)); - GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768)); - GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072)); - GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); - GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(1048576)); - GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2097152)); - - ItemList.FluidRegulator_LV.set(addItem(tLastID = 660, "Fluid Regulator (LV)", "Configuable up to 640 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", new Object[]{})); - ItemList.FluidRegulator_MV.set(addItem(tLastID = 661, "Fluid Regulator (MV)", "Configuable up to 2.560 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", new Object[]{})); - ItemList.FluidRegulator_HV.set(addItem(tLastID = 662, "Fluid Regulator (HV)", "Configuable up to 10.240 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", new Object[]{})); - ItemList.FluidRegulator_EV.set(addItem(tLastID = 663, "Fluid Regulator (EV)", "Configuable up to 40.960 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", new Object[]{})); - ItemList.FluidRegulator_IV.set(addItem(tLastID = 664, "Fluid Regulator (IV)", "Configuable up to 163.840 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", new Object[]{})); - ItemList.FluidRegulator_LuV.set(addItem(tLastID = 665, "Fluid Regulator (LuV)", "Configuable up to 655.360 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", new Object[]{})); - ItemList.FluidRegulator_ZPM.set(addItem(tLastID = 666, "Fluid Regulator (ZPM)", "Configuable up to 2.621.440 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", new Object[]{})); - ItemList.FluidRegulator_UV.set(addItem(tLastID = 667, "Fluid Regulator (UV)", "Configuable up to 10.485.760 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", new Object[]{})); - - GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(32)); - GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(128)); - GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(512)); - GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(2048)); - GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(8192)); - GregTech_API.registerCover(ItemList.FluidRegulator_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(32768)); - GregTech_API.registerCover(ItemList.FluidRegulator_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(131072)); - GregTech_API.registerCover(ItemList.FluidRegulator_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_FluidRegulator(524288)); - - ItemList.FluidFilter.set(addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type", new Object[]{})); - GregTech_API.registerCover(ItemList.FluidFilter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Fluidfilter()); - - /**ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) })); + 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))); + + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.Electrum), 'C', OrePrefixes.cableGt02.get(Materials.Silver)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt04.get(Materials.AnnealedCopper), 'C', OrePrefixes.cableGt02.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.TungstenSteel), 'W', OrePrefixes.wireGt04.get(Materials.Graphene), 'C', OrePrefixes.cableGt02.get(Materials.Tungsten)}); + + ItemList.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", "640 L/sec (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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Electric_Pump_MV.set(addItem(611, "Electric Pump (MV)", "2560 L/sec (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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.Electric_Pump_HV.set(addItem(612, "Electric Pump (HV)", "10240 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + ItemList.Electric_Pump_EV.set(addItem(613, "Electric Pump (EV)", "40.960 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + ItemList.Electric_Pump_IV.set(addItem(614, "Electric Pump (IV)", "163.840 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + ItemList.Electric_Pump_LuV.set(addItem(615, "Electric Pump (LuV)", "655.360 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L))); + ItemList.Electric_Pump_ZPM.set(addItem(616, "Electric Pump (ZPM)", "2.621.440 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L))); + ItemList.Electric_Pump_UV.set(addItem(617, "Electric Pump (UV)", "10.485.760 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L))); + ItemList.Electric_Pump_UHV.set(addItem(618, "Electric Pump (UHV)", "20.971.520 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L))); + ItemList.Electric_Pump_UEV.set(addItem(619, "Electric Pump (UEV)", "41.943.040 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + + GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32)); + GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(128)); + GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(512)); + GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2048)); + GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(8192)); + GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32768)); + GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(131072)); + GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(524288)); + GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(1048576)); + GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2097152)); + + ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", "20.480 L/sec (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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", "40.960 L/sec (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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.Steam_Valve_HV.set(addItem(622, "Steam Valve (HV)", "81.920 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", "163.840 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", "327.680 L/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), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + + GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(1024)); + GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(2048)); + GregTech_API.registerCover(ItemList.Steam_Valve_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(4096)); + GregTech_API.registerCover(ItemList.Steam_Valve_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(8192)); + GregTech_API.registerCover(ItemList.Steam_Valve_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(16384)); + + ItemList.FluidRegulator_LV.set(addItem(tLastID = 660, "Fluid Regulator (LV)", "Configuable up to 640 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")); + ItemList.FluidRegulator_MV.set(addItem(tLastID = 661, "Fluid Regulator (MV)", "Configuable up to 2.560 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")); + ItemList.FluidRegulator_HV.set(addItem(tLastID = 662, "Fluid Regulator (HV)", "Configuable up to 10.240 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")); + ItemList.FluidRegulator_EV.set(addItem(tLastID = 663, "Fluid Regulator (EV)", "Configuable up to 40.960 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")); + ItemList.FluidRegulator_IV.set(addItem(tLastID = 664, "Fluid Regulator (IV)", "Configuable up to 163.840 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")); + ItemList.FluidRegulator_LuV.set(addItem(tLastID = 665, "Fluid Regulator (LuV)", "Configuable up to 655.360 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")); + ItemList.FluidRegulator_ZPM.set(addItem(tLastID = 666, "Fluid Regulator (ZPM)", "Configuable up to 2.621.440 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")); + ItemList.FluidRegulator_UV.set(addItem(tLastID = 667, "Fluid Regulator (UV)", "Configuable up to 10.485.760 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")); + + GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32)); + GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(128)); + GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(512)); + GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(2048)); + GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(8192)); + GregTech_API.registerCover(ItemList.FluidRegulator_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32768)); + GregTech_API.registerCover(ItemList.FluidRegulator_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(131072)); + GregTech_API.registerCover(ItemList.FluidRegulator_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(524288)); + + ItemList.FluidFilter.set(addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type")); + GregTech_API.registerCover(ItemList.FluidFilter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Fluidfilter()); + ItemList.ItemFilter_Export.set(addItem(270,"Item Filter Cover (Export)", "Right click with an item to set filter (Only supports Export Mode)")); + GregTech_API.registerCover(ItemList.ItemFilter_Export.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_ItemFilter(true)); + ItemList.ItemFilter_Import.set(addItem(271,"Item Filter Cover (Import)", "Right click with an item to set filter (Only supports Import Mode)")); + GregTech_API.registerCover(ItemList.ItemFilter_Import.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_ItemFilter(false)); + + /*ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) })); ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) })); ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L) })); ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L) })); @@ -580,284 +577,289 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Rotor_ZPM.set(ItemList.Rotor_LuV.get(1L, new Object[0])); ItemList.Rotor_UV.set(ItemList.Rotor_ZPM.get(1L, new Object[0]));**/ - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L, new Object[0]), 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.Conveyor_Module_LV.set(addItem(630, "Conveyor Module (LV)", "1 Stack every 20 secs (as Cover)", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.AnySyntheticRubber)}); - - GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 2)); - GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 4)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 8)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UHV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 16)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UEV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[10][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1, 32)); - - ItemList.Electric_Piston_LV.set(addItem(640, "Electric Piston (LV)", "", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L, new Object[0]), 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.Robot_Arm_LV.set(addItem(650, "Robot Arm (LV)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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)", "Inserts into specific Slots (as Cover)", new Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400)); - GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100)); - GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20)); - GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); - GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - GregTech_API.registerCover(ItemList.Robot_Arm_UHV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - GregTech_API.registerCover(ItemList.Robot_Arm_UEV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[10][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1)); - - ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye", new Object[0])); - ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star", new Object[0])); - ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star", new Object[0])); - - ItemList.Field_Generator_LV.set(addItem(670, "Field Generator (LV)", "", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L)})); - - ItemList.Emitter_LV.set(addItem(680, "Emitter (LV)", "", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_IV.get(1L, new Object[0]), 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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), 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.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1,new Object[0])); - ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A Basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1,new Object[0])); - ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "An Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "An Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); - ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', OrePrefixes.ring.get(Materials.AnySyntheticRubber), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)}); + + ItemList.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))); + + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.AnySyntheticRubber)}); + + GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(400, 1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(100, 1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(20, 1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(4, 1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 1)); + GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 2)); + GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 4)); + GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 8)); + GregTech_API.registerCover(ItemList.Conveyor_Module_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 16)); + GregTech_API.registerCover(ItemList.Conveyor_Module_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 32)); + + ItemList.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))); + + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + ItemList.Robot_Arm_LV.set(addItem(650, "Robot Arm (LV)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", 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)", "Inserts into specific Slots (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(400)); + GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(100)); + GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(20)); + GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(4)); + GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + GregTech_API.registerCover(ItemList.Robot_Arm_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + + ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye")); + ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star")); + ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star")); + + ItemList.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.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))); + + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Emitter_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)}); + + ItemList.Sensor_LV.set(addItem(690, "Sensor (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + ItemList.Sensor_MV.set(addItem(691, "Sensor (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L))); + ItemList.Sensor_HV.set(addItem(692, "Sensor (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.Sensor_EV.set(addItem(693, "Sensor (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L))); + ItemList.Sensor_IV.set(addItem(694, "Sensor (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L))); + ItemList.Sensor_LuV.set(addItem(695, "Sensor (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L))); + ItemList.Sensor_ZPM.set(addItem(696, "Sensor (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L))); + ItemList.Sensor_UV.set(addItem(697, "Sensor (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L))); + ItemList.Sensor_UHV.set(addItem(698, "Sensor (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 256L))); + ItemList.Sensor_UEV.set(addItem(699, "Sensor (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data)}); + GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite)}); + + ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_Vacuum_Tube.set(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_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An Advanced Circuit", OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Computer.set(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_Elite.set(addItem(tLastID = 705, "Mainframe", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", SubTag.NO_UNIFICATION, new Behaviour_DataOrb())); //ItemList.Circuit_Ultimate.set(ItemList.Tool_DataOrb.get(1L, new Object[0])); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])}); - ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])}); - - ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A Basic Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0])); - ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An Advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0])); - ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0])); - ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0])); - ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits", new Object[0])); - ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1,new Object[0])); - ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1,new Object[0])); - ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1,new Object[0])); - ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component", new Object[0])); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1,new Object[0])); - ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A Good Board", new Object[0])); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1,new Object[0])); - ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiber-Reinforced Circuit Board", "An Extreme Board", new Object[0])); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1,new Object[0])); - - ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{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 Object[]{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 Object[]{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.Field_Generator_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderPearl), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.wireGt01.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.EnderEye), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.wireGt02.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumEye.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.wireGt04.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', OrePrefixes.gem.get(Materials.NetherStar), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.wireGt08.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Field_Generator_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", 'G', ItemList.QuantumStar.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.wireGt16.get(Materials.Osmium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Component_Sawblade_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', OrePrefixes.gearGt.get(Materials.CobaltBrass)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Diamond.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"DSD", "SIS", "DSD", 'I', OrePrefixes.gem.get(Materials.Diamond), 'D', OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Tungsten.get(1L, new Object[0]), 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 Object[]{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 Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L)})); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L, new Object[0]), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L, new Object[0]), 6400, 16); - - ItemList.Component_Filter.set(addItem(tLastID = 729, "Item Filter", "", new Object[]{new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L, new MaterialStack[0]), 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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); - GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), ItemList.Cover_PlayerDetector.get(1L, new Object[0]), 3200, 128); - - GregTech_API.registerCover(ItemList.Cover_Controller.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONTROLLER)}), new GT_Cover_ControlsWork()); - GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_DoesWork()); - GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_LiquidMeter()); - GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ITEMDETECTOR)}), new GT_Cover_ItemMeter()); - GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ENERGYDETECTOR)}), new GT_Cover_EUMeter()); - GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_PlayerDetector()); - - ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor Cover", "Displays Data and GUI", new Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass)}); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 200, 64); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 800, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.Cover_Drain.get(1L, new Object[0]), ItemList.Cover_Shutter.get(1L, new Object[0]), 400, 30); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 200, 64); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 800, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L, new Object[0]), 400, 30); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 200, 64); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L, new Object[0]), 800, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), ItemList.FluidFilter.get(1L, new Object[0]), 800, 4); - - GregTech_API.registerCover(ItemList.Cover_Screen.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN)}), new GT_Cover_Screen()); - GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CRAFTING)}), new GT_Cover_Crafting()); - GregTech_API.registerCover(ItemList.Cover_Drain.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[0][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DRAIN)}), new GT_Cover_Drain()); - GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)}), new GT_Cover_Shutter()); - - ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you (Needs cleaning with right click)", new Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL), new GT_Cover_SolarPanel(1)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), new GT_Cover_SolarPanel(8)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_Cover_SolarPanel(32)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_Cover_SolarPanel(128)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), new GT_Cover_SolarPanel(512)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_Cover_SolarPanel(2048)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_Cover_SolarPanel(8192)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_Cover_SolarPanel(524288)); - - ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", new Object[]{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", new Object[]{Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L)})); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L)}); + ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage", SubTag.NO_UNIFICATION, new Behaviour_DataStick())); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L)}); + + ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A Basic Board")); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1)); + ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An Advanced Board")); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1)); + ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board")); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1)); + ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits")); + ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits")); + ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component")); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1)); + ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component")); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1)); + ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component")); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1)); + ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component")); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1)); + ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A Good Board")); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1)); + ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiber-Reinforced Circuit Board", "An Extreme Board")); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1)); + + ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade)); + ItemList.Component_Grinder_Diamond.set(addItem(tLastID = 722, "Diamond Grinding Head", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), OreDictNames.craftingGrinder)); + ItemList.Component_Grinder_Tungsten.set(addItem(tLastID = 723, "Tungsten Grinding Head", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), OreDictNames.craftingGrinder)); + + GT_ModHandler.addCraftingRecipe(ItemList.Component_Sawblade_Diamond.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', OrePrefixes.gearGt.get(Materials.CobaltBrass)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Diamond.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"DSD", "SIS", "DSD", 'I', OrePrefixes.gem.get(Materials.Diamond), 'D', OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Tungsten.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); + + ItemList.Upgrade_Muffler.set(addItem(tLastID = 727, "Muffler Upgrade", "Makes Machines silent", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L))); + ItemList.Upgrade_Lock.set(addItem(tLastID = 728, "Lock Upgrade", "Protects your Machines", new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), ItemList.Upgrade_Muffler.get(1L), 1600, 2); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L), 6400, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), ItemList.Upgrade_Lock.get(1L), 6400, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), 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))); + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), ItemList.Cover_PlayerDetector.get(1L), 3200, 128); + + GregTech_API.registerCover(ItemList.Cover_Controller.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), new GT_Cover_ControlsWork()); + GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_DoesWork()); + GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_LiquidMeter()); + GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), new GT_Cover_ItemMeter()); + GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), new GT_Cover_EUMeter()); + GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_PlayerDetector()); + + ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor Cover", "Displays Data and GUI", new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))); + ItemList.Cover_Crafting.set(addItem(tLastID = 744, "Crafting Table Cover", "Better than a wooden Workbench", new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L))); + ItemList.Cover_Drain.set(addItem(tLastID = 745, "Drain Module Cover", "Absorbs Fluids and collects Rain", new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + + ItemList.Cover_Shutter.set(addItem(tLastID = 749, "Shutter Module Cover", "Blocks Inventory/Tank Side. Use together with Machine Controller.", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + + GT_ModHandler.addCraftingRecipe(ItemList.Cover_Screen.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass)}); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_Drain.get(1L), ItemList.Cover_Shutter.get(1L), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.Cover_Drain.get(1L), ItemList.Cover_Shutter.get(1L), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.Cover_Drain.get(1L), ItemList.Cover_Shutter.get(1L), 400, 30); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), new ItemStack(Blocks.iron_bars, 2), ItemList.Cover_Drain.get(1L), 400, 30); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L), 200, 64); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L), 800, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L), 800, 16); + GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), ItemList.FluidFilter.get(1L), 800, 4); + + GregTech_API.registerCover(ItemList.Cover_Screen.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_SCREEN), TextureFactory.builder().addIcon(OVERLAY_SCREEN_GLOW).glow().build())), new GT_Cover_Screen()); + GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), new GT_Cover_Crafting()); + GregTech_API.registerCover(ItemList.Cover_Drain.get(1L), TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), new GT_Cover_Drain()); + GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Shutter()); + + ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))); + ItemList.Cover_SolarPanel_8V.set(addItem(tLastID = 751, "Solar Panel (8V)", "8 Volt Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L))); + ItemList.Cover_SolarPanel_LV.set(addItem(tLastID = 752, "Solar Panel (LV)", "Low Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L))); + ItemList.Cover_SolarPanel_MV.set(addItem(tLastID = 753, "Solar Panel (MV)", "Medium Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L))); + ItemList.Cover_SolarPanel_HV.set(addItem(tLastID = 754, "Solar Panel (HV)", "High Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L))); + ItemList.Cover_SolarPanel_EV.set(addItem(tLastID = 755, "Solar Panel (EV)", "Extreme Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L))); + ItemList.Cover_SolarPanel_IV.set(addItem(tLastID = 756, "Solar Panel (IV)", "Insane Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_LuV.set(addItem(tLastID = 757, "Solar Panel (LuV)", "Ludicrous Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_ZPM.set(addItem(tLastID = 758, "Solar Panel (ZPM)", "ZPM Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_UV.set(addItem(tLastID = 759, "Solar Panel (UV)", "Ultimate Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + + GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L), TextureFactory.of(SOLARPANEL), new GT_Cover_SolarPanel(1)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L), TextureFactory.of(SOLARPANEL_8V), new GT_Cover_SolarPanel(8)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L), TextureFactory.of(SOLARPANEL_LV), new GT_Cover_SolarPanel(32)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L), TextureFactory.of(SOLARPANEL_MV), new GT_Cover_SolarPanel(128)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L), TextureFactory.of(SOLARPANEL_HV), new GT_Cover_SolarPanel(512)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L), TextureFactory.of(SOLARPANEL_EV), new GT_Cover_SolarPanel(2048)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L), TextureFactory.of(SOLARPANEL_IV), new GT_Cover_SolarPanel(8192)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L), TextureFactory.of(SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L), TextureFactory.of(SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L), TextureFactory.of(SOLARPANEL_UV), new GT_Cover_SolarPanel(524288)); + + ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", Behaviour_Sonictron.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.Tool_Cheat.set(addItem(tLastID = 761, "Debug Scanner", "Also an Infinite Energy Source", Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L))); setElectricStats(32000 + tLastID, -2000000000L, 1000000000L, -1L, -3L, false); - ItemList.Tool_Scanner.set(addItem(tLastID = 762, "Portable Scanner", "Tricorder", new Object[]{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, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium}); - ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Object[]{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 Object[]{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 Object[]{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(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 4L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), ItemList.Schematic.get(1L, new Object[0]), 3200, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_LV.get(1L, new Object[0]), ItemList.Emitter_LV.get(1L, new Object[0]), ItemList.NC_SensorKit.get(1L, new Object[0]), 1600, 2); - - ItemList.Cover_RedstoneTransmitterExternal.set(addItem(tLastID = 741, "Redstone Transmitter (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); - ItemList.Cover_RedstoneTransmitterInternal.set(addItem(tLastID = 742, "Redstone Transmitter (In)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); - ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)})); - ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new Object[]{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, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterExternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_RedstoneTransmitterInternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverExternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)}), new GT_Cover_RedstoneReceiverInternal()); - - GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), 3200, 128); - GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), 3200, 128); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0])}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0])}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0])}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0])}); - - ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintenance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", new Object[]{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, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR)}), new GT_Cover_NeedMaintainance()); - GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), 600, 24); + GT_ModHandler.addCraftingRecipe(ItemList.Tool_Scanner.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium}); + ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Behaviour_SensorKit())); + ItemList.Duct_Tape.set(addItem(tLastID = 764, "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", "If you can't fix it with this, use more of it!", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), OreDictNames.craftingDuctTape)); + ItemList.McGuffium_239.set(addItem(tLastID = 765, "Mc Guffium 239", "42% better than Phlebotnium", new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))); + + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_LV.get(1L), ItemList.Emitter_LV.get(1L), ItemList.NC_SensorKit.get(1L), 1600, 2); + + ItemList.Cover_RedstoneTransmitterExternal.set(addItem(tLastID = 741, "Redstone Transmitter (Out)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneTransmitterInternal.set(addItem(tLastID = 742, "Redstone Transmitter (In)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + + GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterExternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterInternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverExternal()); + GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverInternal()); + + GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneTransmitterExternal.get(1L), 3200, 128); + GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneReceiverExternal.get(1L), 3200, 128); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterInternal.get(1L), new Object[]{ItemList.Cover_RedstoneTransmitterExternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverInternal.get(1L), new Object[]{ItemList.Cover_RedstoneReceiverExternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L)}); + + ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintenance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_NeedMaintainance()); + GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L), 600, 24); + + GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Export.get(1L),new Object[]{"SPS","dIC","SPS",'P',OrePrefixes.plateDouble.get(Materials.StainlessSteel),'S',OrePrefixes.screw.get(Materials.StainlessSteel),'I',ItemList.Component_Filter,'C',ItemList.Conveyor_Module_HV}); + GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Import.get(1L),new Object[]{"SPS","CId","SPS",'P',OrePrefixes.plateDouble.get(Materials.StainlessSteel),'S',OrePrefixes.screw.get(Materials.StainlessSteel),'I',ItemList.Component_Filter,'C',ItemList.Conveyor_Module_HV}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.ItemFilter_Export.get(1L),new Object[]{ItemList.ItemFilter_Import.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.ItemFilter_Import.get(1L),new Object[]{ItemList.ItemFilter_Export.get(1L)}); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(1)},Materials.SolderingAlloy.getMolten(72L),ItemList.ItemFilter_Export.get(1L),100,30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(1)},Materials.Tin.getMolten(144L),ItemList.ItemFilter_Export.get(1L),100,30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(1)},Materials.Lead.getMolten(288L),ItemList.ItemFilter_Export.get(1L),100,30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(2)},Materials.SolderingAlloy.getMolten(72L),ItemList.ItemFilter_Import.get(1L),100,30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(2)},Materials.Tin.getMolten(144L),ItemList.ItemFilter_Import.get(1L),100,30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble,Materials.StainlessSteel,2L),ItemList.Component_Filter.get(1L),ItemList.Conveyor_Module_HV.get(1L),GT_Utility.getIntegratedCircuit(2)},Materials.Lead.getMolten(288L),ItemList.ItemFilter_Import.get(1L),100,30); } private static final Map<Materials,Materials> cauldronRemap =new HashMap<>(); @@ -866,6 +868,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { cauldronRemap.put(in,out); } + @Override public boolean onEntityItemUpdate(EntityItem aItemEntity) { int aDamage = aItemEntity.getEntityItem().getItemDamage(); if ((aDamage < 32000) && (aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) { @@ -898,7 +901,7 @@ 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(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize, new Object[]{})); + aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } @@ -908,6 +911,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { return false; } + @Override protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); int aDamage = aStack.getItemDamage(); @@ -935,14 +939,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { return false; } + @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))); } + @Override public ItemStack getContainerItem(ItemStack aStack) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 32430) && (aDamage <= 32461)) { - return ItemList.Spray_Empty.get(1L, new Object[0]); + return ItemList.Spray_Empty.get(1L); } if ((aDamage == 32479) || (aDamage == 32476)) { return new ItemStack(this, 1, aDamage - 2); @@ -953,7 +959,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { return super.getContainerItem(aStack); } + @Override public boolean doesMaterialAllowGeneration(OrePrefixes aPrefix, Materials aMaterial) { return (super.doesMaterialAllowGeneration(aPrefix, aMaterial)); } -}
\ No newline at end of file +} 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 d1bc513328..344cacefe1 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 @@ -1,11 +1,21 @@ package gregtech.common.items; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects; import gregtech.api.items.GT_MetaGenerated_Item_X32; -import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.objects.ItemData; -import gregtech.api.util.*; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_FoodStat; +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 gregtech.common.items.behaviors.Behaviour_Arrow; import net.minecraft.dispenser.IBlockSource; import net.minecraft.enchantment.Enchantment; @@ -24,7 +34,7 @@ import net.minecraft.world.World; public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_02 INSTANCE; - private final static String aTextCover = "Usable as Cover"; private final static String aTextForestry = "Forestry"; + private static final String aTextCover = "Usable as Cover"; private static final String aTextForestry = "Forestry"; public GT_MetaGenerated_Item_02() { super("metaitem.02", OrePrefixes.toolHeadSword, OrePrefixes.toolHeadPickaxe, OrePrefixes.toolHeadShovel, OrePrefixes.toolHeadAxe, OrePrefixes.toolHeadHoe, OrePrefixes.toolHeadHammer, OrePrefixes.toolHeadFile, OrePrefixes.toolHeadSaw, OrePrefixes.toolHeadDrill, OrePrefixes.toolHeadChainsaw, OrePrefixes.toolHeadWrench, OrePrefixes.toolHeadUniversalSpade, OrePrefixes.toolHeadSense, OrePrefixes.toolHeadPlow, OrePrefixes.toolHeadArrow, OrePrefixes.toolHeadBuzzSaw, OrePrefixes.turbineBlade, null, OrePrefixes.itemCasing, OrePrefixes.wireFine, OrePrefixes.gearGtSmall, OrePrefixes.rotor, OrePrefixes.stickLong, OrePrefixes.springSmall, OrePrefixes.spring, OrePrefixes.arrowGtWood, OrePrefixes.arrowGtPlastic, OrePrefixes.gemChipped, OrePrefixes.gemFlawed, OrePrefixes.gemFlawless, OrePrefixes.gemExquisite, OrePrefixes.gearGt); @@ -241,36 +251,36 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe(ItemList.Plank_Maple.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 6)}); GT_ModHandler.addCraftingRecipe(ItemList.Plank_Citrus.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 7)}); - GregTech_API.registerCover(ItemList.Plank_Oak.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 0), null); - GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 1), null); - GregTech_API.registerCover(ItemList.Plank_Birch.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 2), null); - GregTech_API.registerCover(ItemList.Plank_Jungle.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 3), null); - GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 4), null); - GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 5), null); - GregTech_API.registerCover(ItemList.Plank_Larch.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), 0, 0), null); - GregTech_API.registerCover(ItemList.Plank_Teak.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), 0, 1), null); - GregTech_API.registerCover(ItemList.Plank_Acacia_Green.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), 0, 2), null); - GregTech_API.registerCover(ItemList.Plank_Lime.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), 0, 3), null); - GregTech_API.registerCover(ItemList.Plank_Chestnut.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), 0, 4), null); - GregTech_API.registerCover(ItemList.Plank_Wenge.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), 0, 5), null); - GregTech_API.registerCover(ItemList.Plank_Baobab.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), 0, 6), null); - GregTech_API.registerCover(ItemList.Plank_Sequoia.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), 0, 7), null); - GregTech_API.registerCover(ItemList.Plank_Kapok.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), 0, 8), null); - GregTech_API.registerCover(ItemList.Plank_Ebony.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), 0, 9), null); - GregTech_API.registerCover(ItemList.Plank_Mahagony.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), 0, 10), null); - GregTech_API.registerCover(ItemList.Plank_Balsa.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), 0, 11), null); - GregTech_API.registerCover(ItemList.Plank_Willow.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), 0, 12), null); - GregTech_API.registerCover(ItemList.Plank_Walnut.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), 0, 13), null); - GregTech_API.registerCover(ItemList.Plank_Greenheart.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), 0, 14), null); - GregTech_API.registerCover(ItemList.Plank_Cherry.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), 0, 15), null); - GregTech_API.registerCover(ItemList.Plank_Mahoe.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), 0, 0), null); - GregTech_API.registerCover(ItemList.Plank_Poplar.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), 0, 1), null); - GregTech_API.registerCover(ItemList.Plank_Palm.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), 0, 2), null); - GregTech_API.registerCover(ItemList.Plank_Papaya.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), 0, 3), null); - GregTech_API.registerCover(ItemList.Plank_Pine.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), 0, 4), null); - GregTech_API.registerCover(ItemList.Plank_Plum.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), 0, 5), null); - GregTech_API.registerCover(ItemList.Plank_Maple.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), 0, 6), null); - GregTech_API.registerCover(ItemList.Plank_Citrus.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), 0, 7), null); + 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); + GregTech_API.registerCover(ItemList.Plank_Birch.get(1L), TextureFactory.of(Blocks.planks, 2), null); + GregTech_API.registerCover(ItemList.Plank_Jungle.get(1L), TextureFactory.of(Blocks.planks, 3), null); + GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), TextureFactory.of(Blocks.planks, 4), null); + GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), TextureFactory.of(Blocks.planks, 5), null); + GregTech_API.registerCover(ItemList.Plank_Larch.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), 0), null); + GregTech_API.registerCover(ItemList.Plank_Teak.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), 1), null); + GregTech_API.registerCover(ItemList.Plank_Acacia_Green.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), 2), null); + GregTech_API.registerCover(ItemList.Plank_Lime.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), 3), null); + GregTech_API.registerCover(ItemList.Plank_Chestnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), 4), null); + GregTech_API.registerCover(ItemList.Plank_Wenge.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), 5), null); + GregTech_API.registerCover(ItemList.Plank_Baobab.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), 6), null); + GregTech_API.registerCover(ItemList.Plank_Sequoia.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), 7), null); + GregTech_API.registerCover(ItemList.Plank_Kapok.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), 8), null); + GregTech_API.registerCover(ItemList.Plank_Ebony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), 9), null); + GregTech_API.registerCover(ItemList.Plank_Mahagony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), 10), null); + GregTech_API.registerCover(ItemList.Plank_Balsa.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), 11), null); + GregTech_API.registerCover(ItemList.Plank_Willow.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), 12), null); + GregTech_API.registerCover(ItemList.Plank_Walnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), 13), null); + GregTech_API.registerCover(ItemList.Plank_Greenheart.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), 14), null); + GregTech_API.registerCover(ItemList.Plank_Cherry.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), 15), null); + GregTech_API.registerCover(ItemList.Plank_Mahoe.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), 0), null); + GregTech_API.registerCover(ItemList.Plank_Poplar.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), 1), null); + GregTech_API.registerCover(ItemList.Plank_Palm.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), 2), null); + GregTech_API.registerCover(ItemList.Plank_Papaya.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), 3), null); + GregTech_API.registerCover(ItemList.Plank_Pine.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), 4), null); + GregTech_API.registerCover(ItemList.Plank_Plum.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), 5), null); + GregTech_API.registerCover(ItemList.Plank_Maple.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), 6), null); + GregTech_API.registerCover(ItemList.Plank_Citrus.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), 7), null); ItemList.Crop_Drop_Plumbilia.set(addItem(tLastID = 500, "Plumbilia Leaf", "Source of Lead", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); ItemList.Crop_Drop_Argentia.set(addItem(tLastID = 501, "Argentia Leaf", "Source of Silver", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); @@ -394,6 +404,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { ItemList.Display_ITS_FREE.set(addItem(tLastID = 766, "ITS FREE", "(or at least almost free)", SubTag.INVISIBLE, new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); } + @Override public boolean onLeftClickEntity(ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { super.onLeftClickEntity(aStack, aPlayer, aEntity); int aDamage = aStack.getItemDamage(); @@ -406,11 +417,13 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { return false; } + @Override public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack) { int aDamage = aStack.getItemDamage(); return ((aDamage >= 25000) && (aDamage < 27000)) || (super.hasProjectile(aProjectileType, aStack)); } + @Override public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { @@ -422,6 +435,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ); } + @Override public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { @@ -433,6 +447,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed); } + @Override public boolean isItemStackUsable(ItemStack aStack) { int aDamage = aStack.getItemDamage(); Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; @@ -450,10 +465,12 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { return super.isItemStackUsable(aStack); } + @Override public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { return (aDoShowAllItems) || (!aPrefix.name().startsWith("toolHead")); } + @Override public ItemStack onDispense(IBlockSource aSource, ItemStack aStack) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { @@ -465,6 +482,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { return super.onDispense(aSource, aStack); } + @Override public final ItemStack getContainerItem(ItemStack aStack) { int aDamage = aStack.getItemDamage(); if (aDamage < 32000) { 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 f0cb4024d5..251842334a 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -1,17 +1,25 @@ package gregtech.common.items; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects; import gregtech.api.items.GT_MetaGenerated_Item_X32; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.covers.GT_Cover_SolarPanel; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UEV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UHV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UIV; + public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_03 INSTANCE; public GT_MetaGenerated_Item_03() { - super("metaitem.03", new OrePrefixes[]{OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate}); + super("metaitem.03", OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate); INSTANCE = this; int tLastID = 0; Object[] o = new Object[0]; @@ -25,11 +33,6 @@ public class GT_MetaGenerated_Item_03 * fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil + sulfurci acid * wetware lifesupport board / fiberglass CB + teflon + */ -// ItemList.Circuit_Board_Coated.set(addItem(tLastID = 1, "Coated Circuit Board", "A basic Board", o)); -// ItemList.Circuit_Board_Phenolic.set(addItem(tLastID = 2, "Phenolic Circuit Board", "A good Board", o)); -// ItemList.Circuit_Board_Epoxy.set(addItem(tLastID = 3, "Epoxy Circuit Board", "An advanced Board", o)); -// ItemList.Circuit_Board_Fiberglass.set(addItem(tLastID = 4, "Fiberglass Circuit Board", "An advanced Board", o)); -// ItemList.Circuit_Board_Multifiberglass.set(addItem(tLastID = 5, "Multilayer Fiberglass Circuit Board", "A elite Board", 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)); @@ -44,16 +47,11 @@ public class GT_MetaGenerated_Item_03 * capacitors normal+smd * Glass Fibers */ -// ItemList.Circuit_Parts_Resistor.set(addItem(tLastID = 10, "Resistor", "Basic Electronic Component", o)); //wiring mv ItemList.Circuit_Parts_ResistorSMD.set(addItem(tLastID = 11, "SMD Resistor", "Electronic Component", o)); ItemList.Circuit_Parts_Glass_Tube.set(addItem(tLastID = 12, "Glass Tube", "", o)); -// ItemList.Circuit_Parts_Vacuum_Tube.set(addItem(tLastID = 13, "Vacuum Tube", "Basic Electronic Component", o)); //Circuit_Primitive ItemList.Circuit_Parts_Coil.set(addItem(tLastID = 14, "Small Coil", "Basic Electronic Component", o)); -// ItemList.Circuit_Parts_Diode.set(addItem(tLastID = 15, "Diode", "Basic Electronic Component", o)); ItemList.Circuit_Parts_DiodeSMD.set(addItem(tLastID = 16, "SMD Diode", "Electronic Component", o)); -// ItemList.Circuit_Parts_Transistor.set(addItem(tLastID = 17, "Transistor", "Basic Electronic Component", o)); //wiring hv ItemList.Circuit_Parts_TransistorSMD.set(addItem(tLastID = 18, "SMD Transistor", "Electronic Component", o)); -// ItemList.Circuit_Parts_Capacitor.set(addItem(tLastID = 19, "Capacitor", "Electronic Component", o)); //wiring ev ItemList.Circuit_Parts_CapacitorSMD.set(addItem(tLastID = 20, "SMD Capacitor", "Electronic Component", o)); 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)); @@ -164,47 +162,47 @@ public class GT_MetaGenerated_Item_03 ItemList.Circuit_Chip_BioCPU.set(addItem(tLastID = 77, "Bio Processing Unit", "Bio CPU", o)); //Nand Chip - ItemList.NandChip.set(addItem(tLastID = 75, "Nand Chip", "A very simple Circuit", new Object[]{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)); //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", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Integrated_Good.set(addItem(tLastID = 79, "Good Integrated Circuit", "Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); //Good Integrated Circuit Item01 //Advanced Circuit IC2 - ItemList.Circuit_Microprocessor.set(addItem(tLastID = 78, "Microprocessor", "A Basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "A Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Microprocessor.set(addItem(tLastID = 78, "Microprocessor", "A Basic Circuit", OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "A Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); //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", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Nanocomputer.set(addItem(tLastID = 83, "Nanoprocessor Assembly", "An Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Elitenanocomputer.set(addItem(tLastID = 84, "Elite Nanocomputer", "An Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "An Advanced Circuit", OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Nanocomputer.set(addItem(tLastID = 83, "Nanoprocessor Assembly", "An Extreme Circuit", OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Elitenanocomputer.set(addItem(tLastID = 84, "Elite Nanocomputer", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); //Nanoprocessor Mainframe Item01 Energy Flow Circuit - ItemList.Circuit_Quantumprocessor.set(addItem(tLastID = 85, "Quantumprocessor", "An Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Quantumcomputer.set(addItem(tLastID = 86, "Quantumprocessor Assembly", "An Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Masterquantumcomputer.set(addItem(tLastID = 87, "Master Quantumcomputer", "A Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "An Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Quantumprocessor.set(addItem(tLastID = 85, "Quantumprocessor", "An Extreme Circuit", OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Quantumcomputer.set(addItem(tLastID = 86, "Quantumprocessor Assembly", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Masterquantumcomputer.set(addItem(tLastID = 87, "Master Quantumcomputer", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "An Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "A Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "An Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "A Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "A Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "An Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "A Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "An Infinite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L, new Object[0]));//maybe should be removed - ItemList.Circuit_Biowarecomputer.set(addItem(tLastID = 98, "Biowareprocessor Assembly", "A Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Biowaresupercomputer.set(addItem(tLastID = 99, "Bioware Supercomputer", "An Infinite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "An Infinite Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L));//maybe should be removed + ItemList.Circuit_Biowarecomputer.set(addItem(tLastID = 98, "Biowareprocessor Assembly", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Biowaresupercomputer.set(addItem(tLastID = 99, "Bioware Supercomputer", "An Infinite Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Bioprocessor.set(addItem(tLastID = 97, "Bioprocessor", "An Ultimate Circuit", new Object[]{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)); 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)); @@ -214,17 +212,17 @@ public class GT_MetaGenerated_Item_03 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_Biomainframe.set(addItem(tLastID = 120, "Bio Mainframe", "A Bio Circuit", new Object[]{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)); 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 Object[]{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 Object[]{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 Object[]{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, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UHV), new GT_Cover_SolarPanel(2097152)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UEV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UEV), new GT_Cover_SolarPanel(8388608)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UIV.get(1L, new Object[0]), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UIV), new GT_Cover_SolarPanel(33554432)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_UHV.get(1L), TextureFactory.of(SOLARPANEL_UHV), new GT_Cover_SolarPanel(2097152)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_UEV.get(1L), TextureFactory.of(SOLARPANEL_UEV), new GT_Cover_SolarPanel(8388608)); + GregTech_API.registerCover(ItemList.Cover_SolarPanel_UIV.get(1L), TextureFactory.of(SOLARPANEL_UIV), new GT_Cover_SolarPanel(33554432)); ItemList.ULV_Coil.set(addItem(tLastID = 140, "Ultra Low Voltage Coil", "Primitive Coil", o)); ItemList.LV_Coil.set(addItem(tLastID = 141, "Low Voltage Coil", "Basic Coil", o)); @@ -238,7 +236,8 @@ public class GT_MetaGenerated_Item_03 ItemList.UHV_Coil.set(addItem(tLastID = 149, "Highly Ultimate Voltage Coil", "Infinite Coil", o)); } + @Override public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { return aDoShowAllItems; } -}
\ No newline at end of file +} 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 e9e406dbc8..2b94d96cb0 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 @@ -21,8 +21,7 @@ import java.util.List; import static gregtech.api.enums.GT_Values.M; import static gregtech.api.enums.OrePrefixes.cellMolten; -public class GT_MetaGenerated_Item_99 - extends GT_MetaGenerated_Item { +public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { public static GT_MetaGenerated_Item_99 INSTANCE; private BitSet enabled=new BitSet(); @@ -166,4 +165,4 @@ public class GT_MetaGenerated_Item_99 public int getItemStackLimit(ItemStack aStack) { return cellMolten.mDefaultStackSize; } -}
\ No newline at end of file +} 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 7bfdfad6a9..fdb29f15c8 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 @@ -145,22 +145,22 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", Character.valueOf('I'), new ItemStack(Items.flint, 1), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Bronze), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Iron), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Steel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.WroughtIron), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.RedSteel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.BlueSteel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.BlackSteel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.DamascusSteel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Thaumium), Character.valueOf('S'), OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", Character.valueOf('I'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Plastic), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Aluminium), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.StainlessSteel), Character.valueOf('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", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.IronWood), Character.valueOf('S'), OrePrefixes.stick.get(Materials.IronWood)}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', OrePrefixes.stick.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.IronWood), 'S', OrePrefixes.stick.get(Materials.IronWood)}); if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) { GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1)}); 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 805754996a..255b705f5c 100644 --- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java +++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java @@ -5,15 +5,14 @@ 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 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); this.setMaxDamage(aMaxDamage); } + @Override 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); @@ -21,26 +20,32 @@ public class GT_NeutronReflector_Item return true; } + @Override public boolean canStoreHeat(IReactor aReactor, ItemStack aStack, int x, int y) { return false; } + @Override public int getMaxHeat(IReactor aReactor, ItemStack aStack, int x, int y) { return 0; } + @Override public int getCurrentHeat(IReactor aReactor, ItemStack aStack, int x, int y) { return 0; } + @Override public float influenceExplosion(IReactor aReactor, ItemStack aStack) { return -1.0F; } + @Override public int alterHeat(IReactor aReactor, ItemStack aStack, int x, int y, int aHeat) { return aHeat; } + @Override public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) { } } diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index 87be9515ae..852babb52a 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -20,9 +20,7 @@ import java.util.LinkedList; import java.util.List; import java.util.UUID; -public class GT_SensorCard_Item - extends GT_Generic_Item - implements IRemoteSensor, IPanelDataSource { +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; @@ -32,6 +30,7 @@ public class GT_SensorCard_Item setMaxStackSize(1); } + @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); if (aStack != null) { @@ -40,7 +39,7 @@ public class GT_SensorCard_Item aList.add(trans("014", "Missing Coodinates!")); } else { aList.add(trans("015", "Device at:")); - aList.add(String.format("x: %d, y: %d, z: %d", new Object[]{Integer.valueOf(tNBT.getInteger("x")), Integer.valueOf(tNBT.getInteger("y")), Integer.valueOf(tNBT.getInteger("z"))})); + aList.add(String.format("x: %d, y: %d, z: %d", tNBT.getInteger("x"), tNBT.getInteger("y"), tNBT.getInteger("z"))); } } } @@ -66,6 +65,7 @@ public class GT_SensorCard_Item return CardState.NO_TARGET; } + @Override public List<PanelString> getStringData(int aSettings, ICardWrapper aCard, boolean aLabels) { List<PanelString> rList = new LinkedList<>(); for (int i = 0; i < (strCount=aCard.getInt("mString")); i++) { @@ -78,6 +78,7 @@ public class GT_SensorCard_Item return rList; } + @Override public List<PanelSetting> getSettingsList() { List<PanelSetting> rList = new ArrayList<>(); for (int i = 0; i < strCount; i++) { @@ -86,10 +87,12 @@ public class GT_SensorCard_Item return rList; } + @Override public UUID getCardType() { return CARD_TYPE; } + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item var1, CreativeTabs aTab, List aList) { } diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java index 5ab6b3395e..c0dcb45943 100644 --- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java +++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java @@ -43,12 +43,14 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain setNoRepair(); } + @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { if (!world.isRemote && isEmpty(stack) && getMovingObjectPositionFromPlayer(world, player, true) == null) player.openGui(GT_Values.GT, 1010, world, 0, 0, 0); return super.onItemRightClick(stack, world, player); } + @Override 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; @@ -100,6 +102,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain return this.maxCapacity; } + @Override public int getCapacity(ItemStack stack) { int capacity = 1000; if (stack.hasTagCompound()) { @@ -126,6 +129,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain nbt.setInteger("Capacity", capacity); } + @Override public FluidStack getFluid(ItemStack stack) { if (stack.hasTagCompound()) { NBTTagCompound nbt = stack.getTagCompound(); @@ -153,6 +157,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain } } + @Override public int fill(ItemStack stack, FluidStack resource, boolean doFill) { if (stack.stackSize != 1) return 0; @@ -173,6 +178,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain return amount; } + @Override public FluidStack drain(ItemStack stack, int maxDrain, boolean doDrain) { if (stack.stackSize != 1) return null; @@ -187,6 +193,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain return new FluidStack(fluidStack, maxDrain); } + @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean b) { super.addInformation(stack, player, info, b); @@ -199,6 +206,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain info.add("Rightclick on air to set volume (only while empty)"); } + @Override @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs creativeTabs, List itemList) { itemList.add(new ItemStack(this)); diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index 0b88ec41ae..5317bfca88 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -1,13 +1,13 @@ package gregtech.common.items; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; 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 forestry.api.recipes.RecipeManagers; import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -23,10 +23,17 @@ 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 java.util.List; +import java.util.Arrays; import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.NF; +import static gregtech.api.enums.GT_Values.NI; +import static gregtech.api.enums.GT_Values.RA; +import static gregtech.api.enums.GT_Values.V; public class ItemComb extends Item { @SideOnly(Side.CLIENT) @@ -69,7 +76,8 @@ public class ItemComb extends Item { return 2; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0"); this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1"); @@ -98,775 +106,466 @@ public class ItemComb extends Item { return CombType.values()[stack.getItemDamage()].getName(); } public void initCombsRecipes() { - ItemStack tComb; - - //Organic - tComb = getStackForType(CombType.LIGNIE); - addSpecialCentLV(tComb,GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), 90); - addProcessLV(tComb, Materials.Lignite, 100); - tComb = getStackForType(CombType.COAL); - addSpecialCentLV(tComb,GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), 5, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), 100); - addProcessLV(tComb, Materials.Coal, 100); - tComb = getStackForType(CombType.STICKY); - addSpecialCentLV(tComb, ItemList.IC2_Resin.get(1, new Object[0]), 50, ItemList.IC2_Plantball.get(1, new Object[0]), 15); - tComb = getStackForType(CombType.OIL); - addSpecialCentLV(tComb, ItemList.Crop_Drop_OilBerry.get(1, new Object[0]), 70, GT_Bees.drop.getStackForType(DropType.OIL), 100); - addProcessLV(tComb, Materials.Oilsands, 100); - tComb = getStackForType(CombType.APATITE); - addProcessLV(tComb, Materials.Apatite, 100); - addProcessLV(tComb, Materials.Phosphate, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Phosphate.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Phosphate, 4), 10000, (int) (Materials.Phosphate.getMass() * 128), 384, false); - tComb = getStackForType(CombType.ASH); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 5000, 5000}, 128, 5); + //Organic + addProcessGT(CombType.LIGNIE, new Materials[] {Materials.Lignite}, Voltage.LV); + addProcessGT(CombType.COAL, new Materials[] {Materials.Coal}, Voltage.LV); + addCentrifugeToItemStack(CombType.STICKY, new ItemStack[] { ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1) }, new int[] {50 * 100, 15 * 100, 50 * 100}, Voltage.ULV); + addProcessGT(CombType.OIL, new Materials[] {Materials.Oilsands}, Voltage.LV); + addProcessGT(CombType.APATITE, new Materials[] {Materials.Apatite, Materials.Phosphate}, Voltage.LV); + addCentrifugeToMaterial(CombType.ASH, new Materials[] {Materials.DarkAsh, Materials.Ash}, new int[] { 50*100, 50*100}, new int[] {}, Voltage.ULV, NI, 50 * 100); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToItemStack(CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 50 * 100}, Voltage.ULV); + addCentrifugeToItemStack(CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 50 * 100}, Voltage.ULV); + addCentrifugeToItemStack(CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(1), GT_Bees.drop.getStackForType(DropType.OIL), ItemList.FR_Wax.get(1) }, new int[] {70 * 100, 100 * 100, 50 * 100}, Voltage.ULV); + }else { + addCentrifugeToItemStack(CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 100 * 100, 50 * 100}, Voltage.ULV); + addCentrifugeToItemStack(CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 100 * 100, 50 * 100}, Voltage.ULV); + addCentrifugeToItemStack(CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(1), GT_Bees.drop.getStackForType(DropType.OIL), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), ItemList.FR_Wax.get(1) }, new int[] {70 * 100, 100 * 100, 100 * 100, 50 * 100}, Voltage.ULV); + addCentrifugeToMaterial(CombType.APATITE, new Materials[] { Materials.Apatite, Materials.Phosphate }, new int[] {100 * 100, 80 * 100 }, new int[] {}, Voltage.ULV, NI, 30 * 100); + } + //ic2 - tComb = getStackForType(CombType.COOLANT); - addSpecialCentHV(tComb, GT_Bees.drop.getStackForType(DropType.COOLANT), 100, ItemList.FR_Wax.get(1, new Object[0]), 100); - tComb = getStackForType(CombType.ENERGY); - addSpecialCentHV(tComb, GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), 20, ItemList.IC2_Energium_Dust.get(1L), 20, ItemList.FR_RefractoryWax.get(1, new Object[0]), 50); - tComb = getStackForType(CombType.LAPOTRON); - addSpecialCentHV(tComb, GT_Bees.drop.getStackForType(DropType.LAPIS), 20, GT_ModHandler.getModItem("dreamcraft", "item.LapotronDust", 1, 0), 15, GT_ModHandler.getModItem("MagicBees", "wax", 1, 2), 40); - tComb = getStackForType(CombType.PYROTHEUM); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Blizz,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Pyrotheum,1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3000, 2500, 2000, 0, 0, 0}, 384, 480); - tComb = getStackForType(CombType.CRYOTHEUM); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Blaze,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Cryotheum,1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3000, 2500, 2000, 0, 0, 0}, 384, 480); - //Alloy - tComb = getStackForType(CombType.REDALLOY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.RedAlloy, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 10000}, 128, 5); - addProcessLV(tComb, Materials.Redstone, 75); - addProcessLV(tComb, Materials.Copper, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Copper.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Copper, 4), 10000, (int) (Materials.Copper.getMass() * 128), 384, false); - tComb = getStackForType(CombType.REDSTONEALLOY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.RedstoneAlloy, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 10000}, 128, 5); - addProcessLV(tComb, Materials.Redstone, 90); - addProcessLV(tComb, Materials.Silicon, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Silicon.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Silicon, 4), 10000, (int) (Materials.Silicon.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Coal, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Coal.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 4), 10000, (int) (Materials.Coal.getMass() * 128), 384, false); - tComb = getStackForType(CombType.CONDUCTIVEIRON); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.ConductiveIron, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 9000}, 256, 120); - addProcessMV(tComb, Materials.Silver, 55); - addProcessMV(tComb, Materials.Iron, 65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Iron.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iron, 4), 10000, (int) (Materials.Iron.getMass() * 128), 768, false); - tComb = getStackForType(CombType.VIBRANTALLOY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.VibrantAlloy, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 7000}, 384, 480); - addProcessHV(tComb, Materials.Chrome, 50); - tComb = getStackForType(CombType.ENERGETICALLOY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.EnergeticAlloy, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 8000}, 384, 480); - addProcessHV(tComb, Materials.Gold, 60); - tComb = getStackForType(CombType.ELECTRICALSTEEL); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.ElectricalSteel, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 10000}, 128, 5); - addProcessLV(tComb, Materials.Silicon, 75); - addProcessLV(tComb, Materials.Coal, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Coal.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 4), 10000, (int) (Materials.Coal.getMass() * 128), 384, false); - tComb = getStackForType(CombType.DARKSTEEL); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkSteel, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 10000}, 256, 120); - addProcessMV(tComb, Materials.Coal, 75); - tComb = getStackForType(CombType.PULSATINGIRON); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PulsatingIron, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 8000}, 384, 480); - addProcessHV(tComb, Materials.Iron, 75); - tComb = getStackForType(CombType.STAINLESSSTEEL); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]),GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 5000}, 384, 480); - addProcessHV(tComb, Materials.Iron, 75); - addProcessHV(tComb, Materials.Chrome, 55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Chrome.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chrome, 4), 10000, (int) (Materials.Chrome.getMass() * 128), 1536, false); - addProcessHV(tComb, Materials.Manganese, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Manganese.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Manganese, 4), 10000, (int) (Materials.Manganese.getMass() * 128), 1536, false); - addProcessHV(tComb, Materials.Nickel, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Nickel.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Nickel, 4), 10000, (int) (Materials.Nickel.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.ENDERIUM); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_RefractoryWax.get(1, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 3000, 5000}, 384, 480); - + addCentrifugeToItemStack(CombType.COOLANT, new ItemStack[] { GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100}, Voltage.HV, 196); + addCentrifugeToItemStack(CombType.ENERGY, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), ItemList.IC2_Energium_Dust.get(1L), ItemList.FR_RefractoryWax.get(1)}, new int[] {20 * 100, 20 * 100, 50 * 100}, Voltage.HV, 196); + addCentrifugeToItemStack(CombType.LAPOTRON, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.LAPIS), GT_ModHandler.getModItem("dreamcraft", "item.LapotronDust", 1, 0), GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) }, new int[] {20 * 100, 15 * 100, 40 * 100}, Voltage.HV, 196); + addCentrifugeToMaterial(CombType.PYROTHEUM, new Materials[] {Materials.Blaze, Materials.Pyrotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.CRYOTHEUM, new Materials[] {Materials.Blizz, Materials.Cryotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); + //Alloy + addProcessGT(CombType.REDALLOY, new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, Voltage.LV); + addProcessGT(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal}, Voltage.LV); + addProcessGT(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron, Materials.Silver, Materials.Iron }, Voltage.MV); + addProcessGT(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy, Materials.Chrome }, Voltage.HV); + addProcessGT(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy, Materials.Gold }, Voltage.HV); + addProcessGT(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, Voltage.LV); + addProcessGT(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel, Materials.Coal }, Voltage.MV); + addProcessGT(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron, Materials.Iron }, Voltage.HV); + addProcessGT(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, Materials.Nickel }, Voltage.HV); + addCentrifugeToItemStack(CombType.ENDERIUM, new ItemStack[] {ItemList.FR_RefractoryWax.get(1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) }, new int[] {50 * 100, 30 * 100, 50 * 100 }, Voltage.HV); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.REDALLOY, new Materials[] {Materials.RedAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron }, new int[] {90 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy }, new int[] {70 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel }, new int[] {100 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel }, new int[] {100 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel }, new int[] {50 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + }else { + addCentrifugeToMaterial(CombType.REDALLOY, new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, new int[] {100 * 100, 75 * 100, 90 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal}, new int[] {100 * 100, 90 * 100, 75 * 100, 75 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron, Materials.Silver, Materials.Iron }, new int[] {90 * 100, 55 * 100, 65 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy, Materials.Chrome }, new int[] {70 * 100, 50 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy, Materials.Gold }, new int[] {80 * 100, 60 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, new int[] {100 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel, Materials.Coal }, new int[] {100 * 100, 75 * 100 }, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron, Materials.Iron }, new int[] {80 * 100, 75 * 100 }, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + addCentrifugeToMaterial(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, Materials.Nickel }, new int[] {50 * 100, 75 * 100, 55 * 100, 75 * 100, 75 * 100 }, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + } + //Thaumic - tComb = getStackForType(CombType.THAUMIUMDUST); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 10000}, 256, 120); - addProcessMV(tComb, Materials.Iron, 75); - tComb = getStackForType(CombType.THAUMIUMSHARD); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, 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), new int[] {2000, 2000, 2000, 2000, 2000, 2000 }, 128, 5); - tComb = getStackForType(CombType.AMBER); - addProcessLV(tComb, Materials.Amber, 100); - tComb = getStackForType(CombType.QUICKSILVER); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 1000}, 128, 5); - addProcessLV(tComb, Materials.Cinnabar, 85); - tComb = getStackForType(CombType.SALISMUNDUS); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 14), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 1000}, 256, 120); - tComb = getStackForType(CombType.TAINTED); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, 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[] {1500, 1500, 1500, 1500, 1500, 5000}, 128, 5); - tComb = getStackForType(CombType.MITHRIL); - addProcessHV(tComb, Materials.Mithril, 75); - addProcessHV(tComb, Materials.Platinum, 55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Platinum.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Platinum, 4), 10000, (int) (Materials.Platinum.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.ASTRALSILVER); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.AstralSilver, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 2000, 1000}, 384, 480); - addProcessHV(tComb, Materials.Silver, 75); - tComb = getStackForType(CombType.THAUMINITE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("thaumicbases", "resource", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 2000, 1000}, 384, 480); - tComb = getStackForType(CombType.SHADOWMETAL); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Shadow, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.ShadowSteel, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {5000, 2000, 1000}, 384, 480); - addProcessHV(tComb, Materials.Shadow, 75); - tComb = getStackForType(CombType.DIVIDED); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, 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), GT_Values.NI, GT_Values.NI, new int[] {5000, 2000, 1000, 500}, 384, 480); - addProcessHV(tComb, Materials.Iron, 75); - addProcessHV(tComb, Materials.Diamond, 55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Diamond.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Diamond, 4), 10000, (int) (Materials.Diamond.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.SPARKELING); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 5), GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 5), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1), GT_Values.NI, GT_Values.NI, new int[] {5000, 1000, 500, 1000}, 512, 1920); - addProcessEV(tComb, Materials.NetherStar, 50); - + addProcessGT(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium, Materials.Iron }, Voltage.MV); + addCentrifugeToItemStack(CombType.THAUMIUMSHARD, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "propolis", 1, 1), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 2), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 3), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 4), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 5), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 6), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) }, new int[] {20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 50 * 100 }, Voltage.ULV); + addProcessGT(CombType.AMBER, new Materials[] {Materials.Amber}, Voltage.LV); + addProcessGT(CombType.QUICKSILVER, new Materials[] {Materials.Cinnabar }, Voltage.LV); + addCentrifugeToItemStack(CombType.SALISMUNDUS, new ItemStack[] {GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 14), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {100 * 100, 50 * 100}, Voltage.MV); + addCentrifugeToItemStack(CombType.TAINTED, new ItemStack[] {GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 11), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 12), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 1), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 2), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {15 * 100, 15 * 100, 15 * 100, 15 * 100, 15 * 100, 50 * 100}, Voltage.ULV); + addProcessGT(CombType.MITHRIL, new Materials[] {Materials.Mithril, Materials.Platinum }, Voltage.HV); + addProcessGT(CombType.ASTRALSILVER, new Materials[] {Materials.AstralSilver, Materials.Silver }, Voltage.HV); + addCentrifugeToMaterial(CombType.ASTRALSILVER, new Materials[] {Materials.AstralSilver, Materials.Silver}, new int[] {20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:75) * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); + addCentrifugeToItemStack(CombType.THAUMINITE, new ItemStack[] {GT_ModHandler.getModItem("thaumicbases", "resource", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {20 * 100, 10 * 100, 50 *100}, Voltage.HV); + addProcessGT(CombType.SHADOWMETAL, new Materials[] {Materials.Shadow, Materials.ShadowSteel }, Voltage.HV); + addCentrifugeToMaterial(CombType.SHADOWMETAL, new Materials[] {Materials.Shadow, Materials.ShadowSteel}, new int[] {(GT_Mod.gregtechproxy.mNerfedCombs ? 20:75) * 100, 10 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) , 50 * 100); + addProcessGT(CombType.DIVIDED, new Materials[] {Materials.Iron, Materials.Diamond }, Voltage.HV); + addCentrifugeToItemStack(CombType.DIVIDED, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("ExtraUtilities", "unstableingot", 1, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1)}, new int[] {50 * 100, 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:75) * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 5:55) * 100}, Voltage.HV); + addProcessGT(CombType.SPARKELING, new Materials[] {Materials.NetherStar}, Voltage.EV); + addCentrifugeToItemStack(CombType.SPARKELING, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("MagicBees", "miscResources", 2, 5), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1)}, new int[] {50 * 100, 10 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:50) * 100}, Voltage.EV); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium }, new int[] {100 * 100}, new int[] {}, Voltage.MV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); + addCentrifugeToItemStack(CombType.QUICKSILVER, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5) }, new int[] {50 * 100, 100 * 100 }, Voltage.ULV); + }else { + addCentrifugeToMaterial(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium, Materials.Iron }, new int[] {100 * 100, 75 * 100 }, new int[] {}, Voltage.MV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); + addCentrifugeToMaterial(CombType.AMBER, new Materials[] {Materials.Amber }, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); + addCentrifugeToItemStack(CombType.QUICKSILVER, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Cinnabar, 1) }, new int[] {50 * 100, 100 * 100, 85 * 100 }, Voltage.ULV); + addCentrifugeToMaterial(CombType.MITHRIL, new Materials[] {Materials.Mithril, Materials.Platinum}, new int[] {75 * 100, 55 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); + } + //Gem Line - tComb = getStackForType(CombType.STONE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.GraniteBlack,1), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.GraniteRed,1), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Basalt,1), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Marble,1), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Redrock,1), new int[] {7000, 5000, 5000, 5000, 5000, 5000}, 128, 5); - addProcessLV(tComb, Materials.Soapstone, 95); - addProcessLV(tComb, Materials.Talc, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Talc.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Talc, 4), 10000, (int) (Materials.Talc.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Apatite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Apatite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Apatite, 4), 10000, (int) (Materials.Apatite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Phosphate, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Phosphate.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Phosphate, 4), 10000, (int) (Materials.Phosphate.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.TricalciumPhosphate, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.TricalciumPhosphate.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.TricalciumPhosphate, 4), 10000, (int) (Materials.TricalciumPhosphate.getMass() * 128), 384, false); - tComb = getStackForType(CombType.CERTUS); - addProcessLV(tComb, Materials.CertusQuartz, 100); - addProcessLV(tComb, Materials.Quartzite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Quartzite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Quartzite, 4), 10000, (int) (Materials.Quartzite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Barite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Barite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Barite, 4), 10000, (int) (Materials.Barite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.FLUIX); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF,ItemList.FR_Wax.get(1, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Fluix,1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {3000, 2500}, 128, 5); - addProcessLV(tComb, Materials.Redstone, 90); - addProcessLV(tComb, Materials.CertusQuartz, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.CertusQuartz.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.CertusQuartz, 4), 10000, (int) (Materials.CertusQuartz.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.NetherQuartz, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.NetherQuartz.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.NetherQuartz, 4), 10000, (int) (Materials.NetherQuartz.getMass() * 128), 384, false); - tComb = getStackForType(CombType.REDSTONE); - addProcessLV(tComb, Materials.Redstone, 100); - addProcessLV(tComb, Materials.Cinnabar, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Cinnabar.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Cinnabar, 4), 10000, (int) (Materials.Cinnabar.getMass() * 128), 384, false); - tComb = getStackForType(CombType.RAREEARTH); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF,ItemList.FR_Wax.get(1, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.RareEarth,1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] {3000, 10000}, 128, 5); - tComb = getStackForType(CombType.LAPIS); - addProcessLV(tComb, Materials.Lapis, 100); - addProcessLV(tComb, Materials.Sodalite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Sodalite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sodalite, 4), 10000, (int) (Materials.Sodalite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Lazurite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lazurite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lazurite, 4), 10000, (int) (Materials.Lazurite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Calcite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Calcite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Calcite, 4), 10000, (int) (Materials.Calcite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.RUBY); - addProcessLV(tComb, Materials.Ruby, 100); - addProcessLV(tComb, Materials.Redstone, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Redstone.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Redstone, 4), 10000, (int) (Materials.Redstone.getMass() * 128), 384, false); - tComb = getStackForType(CombType.REDGARNET); - addProcessLV(tComb, Materials.GarnetRed, 100); - addProcessLV(tComb, Materials.GarnetYellow, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.GarnetYellow.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.GarnetYellow, 4), 10000, (int) (Materials.GarnetYellow.getMass() * 128), 384, false); - tComb = getStackForType(CombType.YELLOWGARNET); - addProcessLV(tComb, Materials.GarnetYellow, 100); - addProcessLV(tComb, Materials.GarnetRed, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.GarnetRed.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.GarnetRed, 4), 10000, (int) (Materials.GarnetRed.getMass() * 128), 384, false); - tComb = getStackForType(CombType.SAPPHIRE); - addProcessLV(tComb, Materials.Sapphire, 100); - addProcessLV(tComb, Materials.GreenSapphire, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.GreenSapphire.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.GreenSapphire, 4), 10000, (int) (Materials.GreenSapphire.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Almandine, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Almandine.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Almandine, 4), 10000, (int) (Materials.Almandine.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Pyrope, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrope.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrope, 4), 10000, (int) (Materials.Pyrope.getMass() * 128), 384, false); - tComb = getStackForType(CombType.DIAMOND); - addProcessLV(tComb, Materials.Diamond, 100); - addProcessLV(tComb, Materials.Graphite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Graphite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Graphite, 4), 10000, (int) (Materials.Graphite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.OLIVINE); - addProcessLV(tComb, Materials.Olivine, 100); - addProcessLV(tComb, Materials.Bentonite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Bentonite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bentonite, 4), 10000, (int) (Materials.Bentonite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Magnesite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnesite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnesite, 4), 10000, (int) (Materials.Magnesite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Glauconite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Glauconite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Glauconite, 4), 10000, (int) (Materials.Glauconite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.EMERALD); - addProcessLV(tComb, Materials.Emerald, 100); - addProcessLV(tComb, Materials.Beryllium, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Beryllium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Beryllium, 4), 10000, (int) (Materials.Beryllium.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Thorium, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Thorium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Thorium, 4), 10000, (int) (Materials.Thorium.getMass() * 128), 384, false); - tComb = getStackForType(CombType.FIRESTONE); - addProcessLV(tComb, Materials.Firestone, 100); - tComb = getStackForType(CombType.PYROPE); - addProcessLV(tComb, Materials.Pyrope, 100); - addProcessLV(tComb, Materials.Aluminium, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Aluminium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Aluminium, 4), 10000, (int) (Materials.Aluminium.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Magnesium, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnesium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnesium, 4), 10000, (int) (Materials.Magnesium.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Silicon, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Silicon.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Silicon, 4), 10000, (int) (Materials.Silicon.getMass() * 128), 384, false); - tComb = getStackForType(CombType.GROSSULAR); - addProcessLV(tComb, Materials.Grossular, 100); - addProcessLV(tComb, Materials.Aluminium, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Aluminium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Aluminium, 4), 10000, (int) (Materials.Aluminium.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Silicon, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Silicon.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Silicon, 4), 10000, (int) (Materials.Silicon.getMass() * 128), 384, false); + addProcessGT(CombType.STONE, new Materials[] {Materials.Soapstone, Materials.Talc, Materials.Apatite, Materials.Phosphate, Materials.TricalciumPhosphate}, Voltage.LV); + addProcessGT(CombType.CERTUS, new Materials[] {Materials.CertusQuartz, Materials.Quartzite, Materials.Barite}, Voltage.LV); + addProcessGT(CombType.FLUIX, new Materials[] {Materials.Redstone, Materials.CertusQuartz, Materials.NetherQuartz}, Voltage.LV); + addProcessGT(CombType.REDSTONE, new Materials[] {Materials.Redstone, Materials.Cinnabar}, Voltage.LV); + addCentrifugeToMaterial(CombType.RAREEARTH, new Materials[] {Materials.RareEarth}, new int[] {100 * 100}, new int[] { 1}, Voltage.ULV, NI, 30 * 100); + addProcessGT(CombType.LAPIS, new Materials[] {Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite }, Voltage.LV); + addProcessGT(CombType.RUBY, new Materials[] {Materials.Ruby, Materials.Redstone }, Voltage.LV); + addProcessGT(CombType.REDGARNET, new Materials[] {Materials.GarnetRed, Materials.GarnetYellow }, Voltage.LV); + addProcessGT(CombType.YELLOWGARNET, new Materials[] {Materials.GarnetYellow, Materials.GarnetRed }, Voltage.LV); + addProcessGT(CombType.SAPPHIRE, new Materials[] {Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, Materials.Pyrope}, Voltage.LV); + addProcessGT(CombType.DIAMOND, new Materials[] {Materials.Diamond, Materials.Graphite}, Voltage.LV); + addProcessGT(CombType.OLIVINE, new Materials[] {Materials.Olivine, Materials.Bentonite, Materials.Magnesite, Materials.Glauconite}, Voltage.LV); + addProcessGT(CombType.EMERALD, new Materials[] {Materials.Emerald, Materials.Beryllium, Materials.Thorium}, Voltage.LV); + addProcessGT(CombType.FIRESTONE, new Materials[] {Materials.Firestone}, Voltage.LV); + addProcessGT(CombType.PYROPE, new Materials[] {Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon}, Voltage.LV); + addProcessGT(CombType.GROSSULAR, new Materials[] {Materials.Grossular, Materials.Aluminium, Materials.Silicon}, Voltage.LV); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.STONE, new Materials[] {Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Basalt, Materials.Marble, Materials.Redrock}, new int[] {70 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100}, new int[] { 9, 9, 9, 9, 9, 9}, Voltage.ULV, NI, 50 * 100); + addCentrifugeToMaterial(CombType.FLUIX, new Materials[] {Materials.Fluix}, new int[] {25 * 100}, new int[] { 9}, Voltage.ULV, NI, 30 * 100); + }else { + addCentrifugeToMaterial(CombType.STONE, new Materials[] {Materials.Soapstone, Materials.Talc, Materials.Apatite, Materials.Phosphate, Materials.TricalciumPhosphate}, new int[] {95 * 100, 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 50 * 100); + addCentrifugeToMaterial(CombType.CERTUS, new Materials[] {Materials.CertusQuartz, Materials.Quartzite, Materials.Barite}, new int[] {100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 50 * 100); + addCentrifugeToMaterial(CombType.FLUIX, new Materials[] {Materials.Fluix, Materials.Redstone, Materials.CertusQuartz, Materials.NetherQuartz}, new int[] {25 * 100, 90 * 100, 90 * 100, 90 * 100}, new int[] { 9, 1, 1, 1}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.REDSTONE, new Materials[] {Materials.Redstone, Materials.Cinnabar }, new int[] {100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LAPIS, new Materials[] {Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite }, new int[] {100 * 100, 90 * 100, 90 * 100, 85 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.RUBY, new Materials[] {Materials.Ruby, Materials.Redstone }, new int[] {100 * 100, 90 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.REDGARNET, new Materials[] {Materials.GarnetRed, Materials.GarnetYellow }, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.YELLOWGARNET, new Materials[] {Materials.GarnetYellow, Materials.GarnetRed }, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.SAPPHIRE, new Materials[] {Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, Materials.Pyrope}, new int[] {100 * 100, 90 * 100, 90 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.DIAMOND, new Materials[] {Materials.Diamond, Materials.Graphite}, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.OLIVINE, new Materials[] {Materials.Olivine, Materials.Bentonite, Materials.Magnesite, Materials.Glauconite}, new int[] {100 * 100, 90 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.EMERALD, new Materials[] {Materials.Emerald, Materials.Beryllium, Materials.Thorium}, new int[] {100 * 100, 85 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.FIRESTONE, new Materials[] {Materials.Firestone}, new int[] {100 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 30 * 100); + addCentrifugeToMaterial(CombType.PYROPE, new Materials[] {Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon}, new int[] {100 * 100, 75 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.GROSSULAR, new Materials[] {Materials.Grossular, Materials.Aluminium, Materials.Silicon}, new int[] {100 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + } + // Metals Line - tComb = getStackForType(CombType.SLAG); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1), 50,GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniteBlack, 1), 20,GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniteRed, 1), 20); - addProcessLV(tComb, Materials.Salt, 100); - addProcessLV(tComb, Materials.RockSalt, 100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.RockSalt.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.RockSalt, 4), 10000, (int) (Materials.RockSalt.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Lepidolite, 100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lepidolite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lepidolite, 4), 10000, (int) (Materials.Lepidolite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Spodumene, 100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Spodumene.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Spodumene, 4), 10000, (int) (Materials.Spodumene.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Monazite, 100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Monazite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Monazite, 4), 10000, (int) (Materials.Monazite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.COPPER); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1), 70); - addProcessLV(tComb, Materials.Copper, 100); - addProcessLV(tComb, Materials.Tetrahedrite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Tetrahedrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 4), 10000, (int) (Materials.Tetrahedrite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Chalcopyrite, 95); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Chalcopyrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 4), 10000, (int) (Materials.Chalcopyrite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Malachite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Malachite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Malachite, 4), 10000, (int) (Materials.Malachite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Pyrite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrite, 4), 10000, (int) (Materials.Pyrite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Stibnite, 65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(6), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Stibnite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Stibnite, 4), 10000, (int) (Materials.Stibnite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.TIN); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1), 60); - addProcessLV(tComb, Materials.Tin, 100); - addProcessLV(tComb, Materials.Cassiterite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Cassiterite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Cassiterite, 4), 10000, (int) (Materials.Cassiterite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.CassiteriteSand, 65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.CassiteriteSand.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.CassiteriteSand, 4), 10000, (int) (Materials.CassiteriteSand.getMass() * 128), 384, false); - tComb = getStackForType(CombType.LEAD); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lead, 1), 45); - addProcessLV(tComb, Materials.Lead, 100); - addProcessLV(tComb, Materials.Galena, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Galena.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 4), 10000, (int) (Materials.Galena.getMass() * 128), 384, false); - tComb = getStackForType(CombType.IRON); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), 30); - addProcessLV(tComb, Materials.Iron, 100); - addProcessLV(tComb, Materials.Magnetite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnetite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnetite, 4), 10000, (int) (Materials.Magnetite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.BrownLimonite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.BrownLimonite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.BrownLimonite, 4), 10000, (int) (Materials.BrownLimonite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.YellowLimonite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.YellowLimonite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.YellowLimonite, 4), 10000, (int) (Materials.YellowLimonite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.VanadiumMagnetite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.VanadiumMagnetite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.VanadiumMagnetite, 4), 10000, (int) (Materials.VanadiumMagnetite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.BandedIron, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(6), Materials.UUMatter.getFluid(Math.max(1, ((Materials.BandedIron.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.BandedIron, 4), 10000, (int) (Materials.BandedIron.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Pyrite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(7), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrite, 4), 10000, (int) (Materials.Pyrite.getMass() * 128), 384, false); - if (ProcessingModSupport.aEnableGCMarsMats) - addProcessLV(tComb, Materials.MeteoricIron, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(8), Materials.UUMatter.getFluid(Math.max(1, ((Materials.MeteoricIron.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.MeteoricIron, 4), 10000, (int) (Materials.MeteoricIron.getMass() * 128), 384, false); - tComb = getStackForType(CombType.STEEL); - addProcessLV(tComb, Materials.Iron, Materials.Iron, 100); - addProcessLV(tComb, Materials.Magnetite, Materials.Magnetite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnetite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnetite, 4), 10000, (int) (Materials.Magnetite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.BrownLimonite, Materials.YellowLimonite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.BrownLimonite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.BrownLimonite, 4), 10000, (int) (Materials.BrownLimonite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.YellowLimonite, Materials.BrownLimonite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.YellowLimonite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.YellowLimonite, 4), 10000, (int) (Materials.YellowLimonite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.VanadiumMagnetite, Materials.VanadiumMagnetite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.VanadiumMagnetite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.VanadiumMagnetite, 4), 10000, (int) (Materials.VanadiumMagnetite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.BandedIron, Materials.BandedIron, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(6), Materials.UUMatter.getFluid(Math.max(1, ((Materials.BandedIron.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.BandedIron, 4), 10000, (int) (Materials.BandedIron.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Pyrite, Materials.Pyrite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(7), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrite, 4), 10000, (int) (Materials.Pyrite.getMass() * 128), 384, false); - if (ProcessingModSupport.aEnableGCMarsMats) - addProcessLV(tComb, Materials.MeteoricIron, Materials.MeteoricIron, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(8), Materials.UUMatter.getFluid(Math.max(1, ((Materials.MeteoricIron.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.MeteoricIron, 4), 10000, (int) (Materials.MeteoricIron.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Molybdenite, 65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(9), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Molybdenite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Molybdenite, 4), 10000, (int) (Materials.Molybdenite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Molybdenum, 65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(10), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Molybdenum.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Molybdenum, 4), 10000, (int) (Materials.Molybdenum.getMass() * 128), 384, false); - tComb = getStackForType(CombType.NICKEL); - addProcessLV(tComb, Materials.Nickel, 100); - addProcessLV(tComb, Materials.Garnierite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Garnierite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Garnierite, 4), 10000, (int) (Materials.Garnierite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Pentlandite, 85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pentlandite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 4), 10000, (int) (Materials.Pentlandite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Cobaltite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Cobaltite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Cobaltite, 4), 10000, (int) (Materials.Cobaltite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Wulfenite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Wulfenite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Wulfenite, 4), 10000, (int) (Materials.Wulfenite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Powellite, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(6), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Powellite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Powellite, 4), 10000, (int) (Materials.Powellite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.ZINC); - addProcessLV(tComb, Materials.Zinc, 100); - addProcessLV(tComb, Materials.Sphalerite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Sphalerite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 4), 10000, (int) (Materials.Sphalerite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Sulfur, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Sulfur.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sulfur, 4), 10000, (int) (Materials.Sulfur.getMass() * 128), 384, false); - tComb = getStackForType(CombType.SILVER); - addSpecialCentLV(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1), 80); - addProcessLV(tComb, Materials.Silver, 100); - addProcessLV(tComb, Materials.Galena, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Galena.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 4), 10000, (int) (Materials.Galena.getMass() * 128), 384, false); - tComb = getStackForType(CombType.GOLD); - addProcessLV(tComb, Materials.Gold, 100); - addProcessLV(tComb, Materials.Magnetite, Materials.Gold, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnetite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnetite, 4), 10000, (int) (Materials.Magnetite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.SULFUR); - addProcessLV(tComb, Materials.Sulfur, 100); - addProcessLV(tComb, Materials.Pyrite, 90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrite, 4), 10000, (int) (Materials.Pyrite.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Sphalerite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Sphalerite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 4), 10000, (int) (Materials.Sphalerite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.GALLIUM); - addProcessLV(tComb, Materials.Gallium, 80); - addProcessLV(tComb, Materials.Niobium, 75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Niobium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Niobium, 4), 10000, (int) (Materials.Niobium.getMass() * 128), 384, false); - tComb = getStackForType(CombType.ARSENIC); - addProcessLV(tComb, Materials.Arsenic, 80); - addProcessLV(tComb, Materials.Bismuth, 70); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Bismuth.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bismuth, 4), 10000, (int) (Materials.Bismuth.getMass() * 128), 384, false); - addProcessLV(tComb, Materials.Antimony, 70); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Antimony.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Antimony, 4), 10000, (int) (Materials.Antimony.getMass() * 128), 384, false); + addProcessGT(CombType.SLAG, new Materials[] {Materials.Salt, Materials.RockSalt, Materials.Lepidolite, Materials.Spodumene, Materials.Monazite}, Voltage.LV); + addProcessGT(CombType.COPPER, new Materials[] {Materials.Copper, Materials.Tetrahedrite, Materials.Chalcopyrite, Materials.Malachite, Materials.Pyrite, Materials.Stibnite}, Voltage.LV); + addProcessGT(CombType.TIN, new Materials[] {Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand}, Voltage.LV); + addProcessGT(CombType.LEAD, new Materials[] {Materials.Lead, Materials.Galena}, Voltage.LV); + addProcessGT(CombType.NICKEL, new Materials[] {Materials.Nickel, Materials.Garnierite, Materials.Pentlandite, Materials.Cobaltite, Materials.Wulfenite, Materials.Powellite}, Voltage.LV); + addProcessGT(CombType.ZINC, new Materials[] {Materials.Zinc, Materials.Sulfur}, Voltage.LV); + addProcessGT(CombType.SILVER, new Materials[] {Materials.Silver, Materials.Galena}, Voltage.LV); + addProcessGT(CombType.GOLD, new Materials[] {Materials.Gold, Materials.Magnetite}, Voltage.LV); + addChemicalProcess(CombType.GOLD, Materials.Magnetite, Materials.Gold, Voltage.LV); + addProcessGT(CombType.SULFUR, new Materials[] {Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite}, Voltage.LV); + addProcessGT(CombType.GALLIUM, new Materials[] {Materials.Gallium, Materials.Niobium}, Voltage.LV); + addProcessGT(CombType.ARSENIC, new Materials[] {Materials.Arsenic, Materials.Bismuth, Materials.Antimony}, Voltage.LV); + if (ProcessingModSupport.aEnableGCMarsMats) { + addProcessGT(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Pyrite, Materials.MeteoricIron}, Voltage.LV); + addProcessGT(CombType.STEEL, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.YellowLimonite, Materials.BrownLimonite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Pyrite, Materials.MeteoricIron, Materials.Molybdenite, Materials.Molybdenum}, Voltage.LV); + }else { + addProcessGT(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Pyrite}, Voltage.LV); + addProcessGT(CombType.STEEL, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.YellowLimonite, Materials.BrownLimonite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Pyrite, Materials.Molybdenite, Materials.Molybdenum}, Voltage.LV); + } + addChemicalProcess(CombType.STEEL, Materials.BrownLimonite, Materials.YellowLimonite, Voltage.LV); + addChemicalProcess(CombType.STEEL, Materials.YellowLimonite, Materials.BrownLimonite, Voltage.LV); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.SLAG, new Materials[] {Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed}, new int[] {50 * 100, 20 * 100, 20 * 100}, new int[] { 9, 9, 9}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.COPPER, new Materials[] {Materials.Copper}, new int[] {70 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.TIN, new Materials[] {Materials.Tin}, new int[] {60 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Lead}, new int[] {45 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron}, new int[] {30 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.STEEL, new Materials[] {Materials.Steel}, new int[] {40 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.SILVER, new Materials[] {Materials.Silver}, new int[] {80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + }else { + addCentrifugeToMaterial(CombType.SLAG, new Materials[] {Materials.Salt, Materials.RockSalt, Materials.Lepidolite, Materials.Spodumene, Materials.Monazite}, new int[] {100 * 100, 100 * 100, 100 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.COPPER, new Materials[] {Materials.Copper, Materials.Tetrahedrite, Materials.Chalcopyrite, Materials.Malachite, Materials.Pyrite, Materials.Stibnite}, new int[] {100 * 100, 85 * 100, 95 * 100, 80 * 100, 75 * 100, 65 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.TIN, new Materials[] {Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand}, new int[] {100 * 100, 85 * 100, 65 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Lead, Materials.Galena}, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + if (ProcessingModSupport.aEnableGCMarsMats) { + addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.MeteoricIron}, new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, Materials.Molybdenite, Materials.Molybdenum, Materials.MeteoricIron }, new int[] {100 * 100, 90 * 100, 80 * 100, 65 * 100, 65 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + }else { + addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.BandedIron}, new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 85 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.STEEL, new Materials[] {Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Molybdenite, Materials.Molybdenum }, new int[] {100 * 100, 90 * 100, 80 * 100, 85 * 100, 65 * 100, 65 * 100 }, new int[] {}, Voltage.ULV, NI, 30 * 100); + } + addCentrifugeToMaterial(CombType.NICKEL, new Materials[] {Materials.Nickel, Materials.Garnierite, Materials.Pentlandite, Materials.Cobaltite, Materials.Wulfenite, Materials.Powellite}, new int[] {100 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.ZINC, new Materials[] {Materials.Zinc, Materials.Sphalerite, Materials.Sulfur}, new int[] {100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.SILVER, new Materials[] {Materials.Silver, Materials.Galena}, new int[] {100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.GOLD, new Materials[] {Materials.Gold}, new int[] {100 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.SULFUR, new Materials[] {Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite}, new int[] {100 * 100, 90 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.GALLIUM, new Materials[] {Materials.Gallium, Materials.Niobium}, new int[] { 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.ARSENIC, new Materials[] {Materials.Arsenic, Materials.Bismuth, Materials.Antimony}, new int[] {80 * 100, 70 * 100, 70 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); + } // Rare Metals Line - tComb = getStackForType(CombType.BAUXITE); - addProcessLV(tComb, Materials.Bauxite, 75); - addProcessLV(tComb,Materials.Aluminium,55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Aluminium.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Aluminium, 4), 10000, (int) (Materials.Aluminium.getMass() * 128), 384, false); - tComb = getStackForType(CombType.ALUMINIUM); - addProcessLV(tComb,Materials.Aluminium,60); - addProcessLV(tComb,Materials.Bauxite,80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Bauxite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bauxite, 4), 10000, (int) (Materials.Bauxite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.MANGANESE); - addProcessLV(tComb,Materials.Manganese,30); - addProcessLV(tComb,Materials.Grossular,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Grossular.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Grossular, 4), 10000, (int) (Materials.Grossular.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Spessartine,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Spessartine.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Spessartine, 4), 10000, (int) (Materials.Spessartine.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Pyrolusite,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrolusite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrolusite, 4), 10000, (int) (Materials.Pyrolusite.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Tantalite,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Tantalite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Tantalite, 4), 10000, (int) (Materials.Tantalite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.TITANIUM); - addProcessEV(tComb,Materials.Titanium,90); - addProcessEV(tComb,Materials.Ilmenite,80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Ilmenite.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Ilmenite, 4), 10000, (int) (Materials.Ilmenite.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Bauxite,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Bauxite.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bauxite, 4), 10000, (int) (Materials.Bauxite.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Rutile,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Rutile.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Rutile, 4), 10000, (int) (Materials.Rutile.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.MAGNESIUM); - addProcessLV(tComb,Materials.Magnesium,100); - addProcessLV(tComb,Materials.Magnesite,80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Magnesite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Magnesite, 4), 10000, (int) (Materials.Magnesite.getMass() * 128), 384, false); - tComb = getStackForType(CombType.CHROME); - addProcessHV(tComb,Materials.Chrome,50); - addProcessHV(tComb,Materials.Ruby,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Ruby.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Ruby, 4), 10000, (int) (Materials.Ruby.getMass() * 128), 1536, false); - addProcessHV(tComb,Materials.Chromite,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Chromite.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chromite, 4), 10000, (int) (Materials.Chromite.getMass() * 128), 1536, false); - addProcessHV(tComb,Materials.Redstone,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Redstone.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Redstone, 4), 10000, (int) (Materials.Redstone.getMass() * 128), 1536, false); - addProcessHV(tComb, Materials.Neodymium, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Neodymium.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Neodymium, 4), 10000, (int) (Materials.Neodymium.getMass() * 128), 1536, false); - addProcessHV(tComb, Materials.Bastnasite, 80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(6), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Bastnasite.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bastnasite, 4), 10000, (int) (Materials.Bastnasite.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.TUNGSTEN); - addProcessIV(tComb,Materials.Tungstate,80); - addProcessIV(tComb,Materials.Scheelite,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Scheelite.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Scheelite, 4), 10000, (int) (Materials.Scheelite.getMass() * 128), 6144, true); - addProcessIV(tComb,Materials.Lithium,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lithium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lithium, 4), 10000, (int) (Materials.Lithium.getMass() * 128), 6144, true); - addProcessIV(tComb,Materials.Tungsten,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Tungsten.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Tungsten, 4), 10000, (int) (Materials.Tungsten.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.PLATINUM); - addProcessHV(tComb,Materials.Platinum,40); - addProcessHV(tComb,Materials.Cooperite,40); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Cooperite.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Cooperite, 4), 10000, (int) (Materials.Cooperite.getMass() * 128), 1536, false); - addProcessHV(tComb,Materials.Palladium,40); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Palladium.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Palladium, 4), 10000, (int) (Materials.Palladium.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.MOLYBDENUM); - addProcessLV(tComb,Materials.Molybdenum,100); - addProcessLV(tComb,Materials.Molybdenite,90); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Molybdenite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Molybdenite, 4), 10000, (int) (Materials.Molybdenite.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Powellite,80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Powellite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Powellite, 4), 10000, (int) (Materials.Powellite.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Wulfenite,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Wulfenite.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Wulfenite, 4), 10000, (int) (Materials.Wulfenite.getMass() * 128), 384, false); - addProcessIV(tComb,Materials.Osmium,15); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(5), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Osmium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Osmium, 4), 10000, (int) (Materials.Osmium.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.IRIDIUM); - addProcessIV(tComb,Materials.Iridium,20); - addProcessIV(tComb,Materials.Osmium,15); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Osmium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Osmium, 4), 10000, (int) (Materials.Osmium.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.OSMIUM); - addProcessIV(tComb,Materials.Osmium,25); - addProcessIV(tComb,Materials.Iridium,15); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Iridium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iridium, 4), 10000, (int) (Materials.Iridium.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.LITHIUM); - addProcessMV(tComb,Materials.Lithium,85); - addProcessMV(tComb,Materials.Aluminium,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Aluminium.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Aluminium, 4), 10000, (int) (Materials.Aluminium.getMass() * 128), 768, false); - - tComb = getStackForType(CombType.SALT); - addProcessMV(tComb,Materials.Salt,100); - addSpecialCentMV(tComb, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), 100, GT_ModHandler.getModItem("dreamcraft", "item.EdibleSalt", 1L, 0), 50); - addProcessMV(tComb,Materials.RockSalt,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.RockSalt.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.RockSalt, 4), 10000, (int) (Materials.RockSalt.getMass() * 128), 768, false); - addProcessMV(tComb,Materials.Saltpeter,65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Saltpeter.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Saltpeter, 4), 10000, (int) (Materials.Saltpeter.getMass() * 128), 768, false); - tComb = getStackForType(CombType.ELECTROTINE); - addProcessHV(tComb,Materials.Electrotine,80); - addProcessHV(tComb,Materials.Electrum,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Electrum.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Electrum, 4), 10000, (int) (Materials.Electrum.getMass() * 128), 1536, false); - addProcessHV(tComb,Materials.Redstone,65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Redstone.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Redstone, 4), 10000, (int) (Materials.Redstone.getMass() * 128), 1536, false); - + addProcessGT(CombType.BAUXITE, new Materials[] {Materials.Bauxite, Materials.Aluminium}, Voltage.LV); + addProcessGT(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium, Materials.Bauxite}, Voltage.LV); + addProcessGT(CombType.MANGANESE, new Materials[] {Materials.Manganese, Materials.Grossular, Materials.Spessartine, Materials.Pyrolusite, Materials.Tantalite}, Voltage.LV); + addProcessGT(CombType.TITANIUM, new Materials[] {Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile}, Voltage.EV); + addProcessGT(CombType.MAGNESIUM, new Materials[] {Materials.Magnesium, Materials.Magnesite}, Voltage.LV); + addProcessGT(CombType.CHROME, new Materials[] {Materials.Chrome, Materials.Ruby, Materials.Chromite, Materials.Redstone, Materials.Neodymium, Materials.Bastnasite}, Voltage.HV); + addProcessGT(CombType.TUNGSTEN, new Materials[] {Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium}, Voltage.IV); + addProcessGT(CombType.PLATINUM, new Materials[] {Materials.Platinum, Materials.Cooperite, Materials.Palladium}, Voltage.HV); + addProcessGT(CombType.MOLYBDENUM, new Materials[] {Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, Materials.Wulfenite}, Voltage.LV); + addChemicalProcess(CombType.MOLYBDENUM, Materials.Osmium, Materials.Osmium, Voltage.IV); + addAutoclaveProcess(CombType.MOLYBDENUM, Materials.Osmium, Voltage.IV, 5); + addProcessGT(CombType.IRIDIUM, new Materials[] {Materials.Iridium, Materials.Osmium}, Voltage.IV); + addProcessGT(CombType.OSMIUM, new Materials[] {Materials.Osmium, Materials.Iridium}, Voltage.IV); + addProcessGT(CombType.LITHIUM, new Materials[] {Materials.Lithium, Materials.Aluminium}, Voltage.MV); + addProcessGT(CombType.SALT, new Materials[] {Materials.Salt, Materials.RockSalt, Materials.Saltpeter}, Voltage.MV); + addProcessGT(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine, Materials.Electrum, Materials.Redstone}, Voltage.MV); + if(GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem("dreamcraft", "item.EdibleSalt", 1L, 0), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 50 * 100}, Voltage.MV, 160); + }else { + addCentrifugeToMaterial(CombType.BAUXITE, new Materials[] {Materials.Bauxite, Materials.Aluminium}, new int[] { 75 * 100, 55 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); + addCentrifugeToMaterial(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium, Materials.Bauxite}, new int[] { 60 * 100, 80 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); + addCentrifugeToMaterial(CombType.MANGANESE, new Materials[] {Materials.Manganese, Materials.Grossular, Materials.Spessartine, Materials.Pyrolusite, Materials.Tantalite}, new int[] { 30 * 100, 100 * 100, 100 * 100, 100 * 100, 100 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); + addCentrifugeToMaterial(CombType.TITANIUM, new Materials[] {Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile}, new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.MAGNESIUM, new Materials[] {Materials.Magnesium, Materials.Magnesite}, new int[] { 100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.CHROME, new Materials[] {Materials.Chrome, Materials.Ruby, Materials.Chromite, Materials.Redstone, Materials.Neodymium, Materials.Bastnasite}, new int[] { 50 * 100, 100 * 100, 50 * 100, 100 * 100, 80 * 100, 80 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.TUNGSTEN, new Materials[] {Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium}, new int[] { 50 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.PLATINUM, new Materials[] {Materials.Platinum, Materials.Cooperite, Materials.Palladium}, new int[] { 40 * 100, 40 * 100, 40 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.MOLYBDENUM, new Materials[] {Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, Materials.Wulfenite}, new int[] { 100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.IRIDIUM, new Materials[] {Materials.Iridium, Materials.Osmium}, new int[] { 20 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.OSMIUM, new Materials[] {Materials.Osmium, Materials.Iridium}, new int[] { 25 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LITHIUM, new Materials[] {Materials.Lithium, Materials.Aluminium}, new int[] { 85 * 100, 75 * 100}, new int[] {}, Voltage.MV, NI, 30 * 100); + addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem("dreamcraft", "item.EdibleSalt", 1L, 0),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.RockSalt, 1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Saltpeter, 1), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 75 * 100, 65 * 100, 50 * 100}, Voltage.MV, 160); + addCentrifugeToMaterial(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine, Materials.Electrum, Materials.Redstone}, new int[] { 80, 75, 65}, new int[] {}, Voltage.MV, NI, 30 * 100); + } + //Radioactive Line - tComb = getStackForType(CombType.ALMANDINE); - addProcessLV(tComb,Materials.Almandine,90); - addProcessLV(tComb,Materials.Pyrope,80); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pyrope.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrope, 4), 10000, (int) (Materials.Pyrope.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.Sapphire,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Sapphire.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sapphire, 4), 10000, (int) (Materials.Sapphire.getMass() * 128), 384, false); - addProcessLV(tComb,Materials.GreenSapphire,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.GreenSapphire.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.GreenSapphire, 4), 10000, (int) (Materials.GreenSapphire.getMass() * 128), 384, false); - tComb = getStackForType(CombType.URANIUM); - addProcessEV(tComb,Materials.Uranium,50); - addProcessEV(tComb,Materials.Pitchblende,65); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Pitchblende.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pitchblende, 4), 10000, (int) (Materials.Pitchblende.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Uraninite,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Uraninite.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Uraninite, 4), 10000, (int) (Materials.Uraninite.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Uranium235,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(4), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Uranium235.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Uranium235, 4), 10000, (int) (Materials.Uranium235.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.PLUTONIUM); - addProcessEV(tComb,Materials.Plutonium,10); - addProcessEV(tComb,Materials.Uranium235, Materials.Plutonium,5); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Uranium235.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Uranium235, 4), 10000, (int) (Materials.Uranium235.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.NAQUADAH); - addProcessIV(tComb,Materials.Naquadah,10); - addProcessIV(tComb, Materials.NaquadahEnriched,5); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.NaquadahEnriched.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.NaquadahEnriched, 4), 10000, (int) (Materials.NaquadahEnriched.getMass() * 128), 6144, true); - addProcessIV(tComb, Materials.Naquadria,5); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Naquadria.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Naquadria, 4), 10000, (int) (Materials.NaquadahEnriched.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.NAQUADRIA); - addProcessLUV(tComb, Materials.Naquadria,10); - addProcessLUV(tComb, Materials.NaquadahEnriched,10); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.NaquadahEnriched.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.NaquadahEnriched, 4), 10000, (int) (Materials.NaquadahEnriched.getMass() * 128), 24576, true); - addProcessLUV(tComb,Materials.Naquadah,15); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Naquadah.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Naquadah, 4), 10000, (int) (Materials.Naquadah.getMass() * 128), 24576, true); - tComb = getStackForType(CombType.THORIUM); - addProcessEV(tComb,Materials.Thorium,75); - addProcessEV(tComb,Materials.Uranium,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Uranium.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Uranium, 4), 10000, (int) (Materials.Uranium.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Coal,95); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Coal.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 4), 10000, (int) (Materials.Coal.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.LUTETIUM); - addProcessIV(tComb,Materials.Lutetium,35); - addProcessIV(tComb,Materials.Thorium,55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Thorium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Thorium, 4), 10000, (int) (Materials.Thorium.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.AMERICUM); - addProcessLUV(tComb,Materials.Americium,25); - addProcessLUV(tComb,Materials.Lutetium,45); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lutetium.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lutetium, 4), 10000, (int) (Materials.Lutetium.getMass() * 128), 24576, true); - tComb = getStackForType(CombType.NEUTRONIUM); - addProcessUV(tComb,Materials.Neutronium,15); - addProcessUV(tComb,Materials.Americium,35); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Americium.getMass()+54)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Americium, 4), 10000, (int) (Materials.Americium.getMass() * 128), 100000, true); - + addProcessGT(CombType.ALMANDINE, new Materials[] {Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire}, Voltage.LV); + addProcessGT(CombType.URANIUM, new Materials[] {Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, Materials.Uranium235}, Voltage.EV); + addProcessGT(CombType.PLUTONIUM,new Materials[] {Materials.Plutonium, Materials.Uranium235}, Voltage.EV); + addChemicalProcess(CombType.PLUTONIUM, Materials.Uranium235, Materials.Plutonium, Voltage.EV); + addProcessGT(CombType.NAQUADAH,new Materials[] {Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria}, Voltage.IV); + addProcessGT(CombType.NAQUADRIA,new Materials[] {Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah}, Voltage.LUV); + addProcessGT(CombType.THORIUM,new Materials[] {Materials.Thorium, Materials.Uranium, Materials.Coal}, Voltage.EV); + addProcessGT(CombType.LUTETIUM,new Materials[] {Materials.Lutetium, Materials.Thorium}, Voltage.IV); + addProcessGT(CombType.AMERICIUM,new Materials[] {Materials.Americium, Materials.Lutetium}, Voltage.LUV); + addProcessGT(CombType.NEUTRONIUM,new Materials[] {Materials.Neutronium, Materials.Americium}, Voltage.UV); + if(!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.ALMANDINE, new Materials[] {Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire}, new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.URANIUM, new Materials[] {Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, Materials.Uranium235}, new int[] { 50 * 100, 65 * 100, 75 * 100, 50 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.PLUTONIUM,new Materials[] {Materials.Plutonium, Materials.Uranium235}, new int[] {10, 5}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.NAQUADAH,new Materials[] {Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria}, new int[] {10 * 100, 5 * 100, 5 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.NAQUADRIA,new Materials[] {Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah}, new int[] {10 * 100, 10 * 100, 15 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.THORIUM,new Materials[] {Materials.Thorium, Materials.Uranium, Materials.Coal}, new int[] {75 * 100, 75 * 100 * 100, 95 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LUTETIUM,new Materials[] {Materials.Lutetium, Materials.Thorium}, new int[] {35 * 100, 55 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.AMERICIUM,new Materials[] {Materials.Americium, Materials.Lutetium}, new int[] {25 * 100, 45 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.NEUTRONIUM,new Materials[] {Materials.Neutronium, Materials.Americium}, new int[] {15 * 100, 35 * 100}, new int[] {}, Voltage.UV, NI, 30 * 100); + } + // Twilight - tComb = getStackForType(CombType.NAGA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), GT_ModHandler.getModItem("dreamcraft", "item.NagaScaleChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.NagaScaleFragment", 1L, 0), GT_Values.NI, GT_Values.NI, new int[]{3000, 500, 3300, 800, 0, 0}, 256, 120); - tComb = getStackForType(CombType.LICH); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 5), GT_ModHandler.getModItem("dreamcraft", "item.LichBoneChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.LichBoneFragment", 1L, 0), GT_Values.NI, GT_Values.NI, new int[]{3000, 500, 3300, 800, 0, 0}, 384, 480); - tComb = getStackForType(CombType.HYDRA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 1), GT_ModHandler.getModItem("dreamcraft", "item.FieryBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.HYDRA), GT_Values.NI, GT_Values.NI, new int[]{3000, 500, 3300, 1000, 0, 0}, 384, 480); - tComb = getStackForType(CombType.URGHAST); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), GT_ModHandler.getModItem("dreamcraft", "item..CarminiteChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CarminiteFragment",1L, 0), GT_Values.NI, GT_Values.NI, new int[]{3000, 500, 3300, 800, 0, 0}, 512, 1920); - tComb = getStackForType(CombType.SNOWQUEEN); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), GT_ModHandler.getModItem("dreamcraft", "item.SnowQueenBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), GT_Values.NI, GT_Values.NI, new int[]{3000, 500, 3300, 1000, 0, 0}, 512, 1920); + addCentrifugeToItemStack(CombType.NAGA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), GT_ModHandler.getModItem("dreamcraft", "item.NagaScaleChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.LichBoneChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "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("dreamcraft", "item.CarminiteChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "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 - tComb = getStackForType(CombType.ENDDUST); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.End), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 1500, 1000}, 384, 480); - tComb = getStackForType(CombType.STARDUST); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Stardust), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 1500, 1000}, 384, 480); - tComb = getStackForType(CombType.ECTOPLASMA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2500, 1000, 1500}, 512, 1920); - tComb = getStackForType(CombType.ARCANESHARD); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2500, 1000,1500}, 512, 1920); - tComb = getStackForType(CombType.DRAGONESSENCE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3000, 750, 2000}, 640, 7680); - tComb = getStackForType(CombType.ENDERMAN); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Enderman), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3000, 750, 2000}, 640, 7680); - tComb = getStackForType(CombType.SILVERFISH); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, 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), GT_Values.NI, GT_Values.NI, new int[]{2500, 1000, 2000, 1500}, 512, 1920); - tComb = getStackForType(CombType.ENDIUM); - addProcessHV(tComb,Materials.HeeEndium,50); - tComb = getStackForType(CombType.RUNEI); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfPowerFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfAgilityFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfVigorFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfDefenseFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfMagicFragment", 1L, 0), new int[]{2500, 500, 500, 500, 500, 500}, 640, 7680); - tComb = getStackForType(CombType.RUNEII); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfVoidFragment", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 250}, 640, 7680); - tComb = getStackForType(CombType.FIREESSENSE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Fireessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3000, 750, 2000}, 640, 7680); + addCentrifugeToItemStack(CombType.ENDDUST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.End), GT_Bees.drop.getStackForType(DropType.ENDERGOO), }, new int[]{20 * 100, 15 * 100, 10 * 100}, Voltage.HV); + addCentrifugeToItemStack(CombType.STARDUST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Stardust), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{20 * 100, 15 * 100, 10 * 100}, Voltage.HV); + addCentrifugeToItemStack(CombType.ECTOPLASMA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{25 * 100, 10 * 100, 15 * 100}, Voltage.EV); + addCentrifugeToItemStack(CombType.ARCANESHARD, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{25 * 100, 10 * 100, 15 * 100}, Voltage.EV); + addCentrifugeToItemStack(CombType.DRAGONESSENCE, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{30 * 100, (int) (7.5 * 100), 20 * 100}, Voltage.IV); + addCentrifugeToItemStack(CombType.ENDERMAN, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Enderman), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{3000, 750, 2000}, Voltage.IV); + addCentrifugeToItemStack(CombType.SILVERFISH, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Silverfish), GT_Bees.drop.getStackForType(DropType.ENDERGOO), new ItemStack(Items.spawn_egg, 1,60) }, new int[]{25 * 100, 10 * 100, 20 * 100, 15 * 100}, Voltage.EV); + addProcessGT(CombType.ENDIUM,new Materials[] {Materials.HeeEndium}, Voltage.HV); + if(!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.ENDIUM,new Materials[] {Materials.HeeEndium}, new int[] {50 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), 20 * 100); + } + addCentrifugeToItemStack(CombType.RUNEI, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfPowerFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfAgilityFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfVigorFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfDefenseFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.RuneOfVoidFragment", 1L, 0) }, new int[]{50 * 100, (int) (2.5 * 100)}, Voltage.IV); + addCentrifugeToItemStack(CombType.FIREESSENSE, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Fireessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{30 * 100, (int) (7.5 * 100), 20 * 100}, Voltage.IV); //Space Line - tComb = getStackForType(CombType.SPACE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), GT_Bees.drop.getStackForType(DropType.OXYGEN), GT_ModHandler.getModItem("dreamcraft", "item.CoinSpace", 1L, 0), GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 1500, 500, 0, 0}, 384, 480); - tComb = getStackForType(CombType.METEORICIRON); - addProcessHV(tComb,Materials.MeteoricIron,85); - addProcessHV(tComb,Materials.Iron,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2),Materials.UUMatter.getFluid(Math.max(1, ((Materials.Iron.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iron, 4), 10000, (int) (Materials.Iron.getMass() * 128), 1536, false); - tComb = getStackForType(CombType.DESH); - addProcessEV(tComb,Materials.Desh,75); - addProcessEV(tComb,Materials.Titanium,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Titanium.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Titanium, 4), 10000, (int) (Materials.Titanium.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.LEDOX); - addProcessEV(tComb,Materials.Ledox,65); - addProcessEV(tComb,Materials.CallistoIce,55); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.CallistoIce.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.CallistoIce, 4), 10000, (int) (Materials.CallistoIce.getMass() * 128), 3072, true); - addProcessEV(tComb,Materials.Lead,85); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lead.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lead, 4), 10000, (int) (Materials.Lead.getMass() * 128), 3072, true); - tComb = getStackForType(CombType.CALLISTOICE); - addProcessIV(tComb,Materials.CallistoIce,65); - addProcessIV(tComb,Materials.Ledox,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Ledox.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Ledox, 4), 10000, (int) (Materials.Ledox.getMass() * 128), 6144, true); - addProcessIV(tComb,Materials.Lead,100); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(3), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lead.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lead, 4), 10000, (int) (Materials.Lead.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.MYTRYL); - addProcessIV(tComb,Materials.Mytryl,55); - addProcessIV(tComb,Materials.Mithril,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Mithril.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Mithril, 4), 10000, (int) (Materials.Mithril.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.QUANTIUM); - addProcessIV(tComb,Materials.Quantium,50); - addProcessIV(tComb,Materials.Osmium,60); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Osmium.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Osmium, 4), 10000, (int) (Materials.Osmium.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.ORIHARUKON); - addProcessIV(tComb,Materials.Oriharukon,50); - addProcessIV(tComb,Materials.Lead,75); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Lead.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Lead, 4), 10000, (int) (Materials.Lead.getMass() * 128), 6144, true); - tComb = getStackForType(CombType.MYSTERIOUSCRYSTAL); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.MysteriousCrystal, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Emerald, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 1000, 1500, 0, 0, 0}, 512, 30720); - addProcessLUV(tComb,Materials.Emerald,50); - addProcessLUV(tComb,Materials.MysteriousCrystal,40); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.MysteriousCrystal.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.MysteriousCrystal, 4), 10000, (int) (Materials.MysteriousCrystal.getMass() * 128), 24576, true); - tComb = getStackForType(CombType.BLACKPLUTONIUM); - addProcessLUV(tComb,Materials.BlackPlutonium,25); - addProcessLUV(tComb,Materials.Plutonium,50); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Plutonium.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Plutonium, 4), 10000, (int) (Materials.Plutonium.getMass() * 128), 24576, true); - tComb = getStackForType(CombType.TRINIUM); - addProcessZPM(tComb,Materials.Trinium,35); - addProcessZPM(tComb,Materials.Iridium,45); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(2), Materials.UUMatter.getFluid(Math.max(1, ((Materials.Iridium.getMass()+45)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iridium, 4), 10000, (int) (Materials.Iridium.getMass() * 128), 100000, true); - + addCentrifugeToItemStack(CombType.SPACE, new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), GT_Bees.drop.getStackForType(DropType.OXYGEN), GT_ModHandler.getModItem("dreamcraft", "item.CoinSpace", 1L, 0)}, new int[]{50 * 100, 30 * 100, 15 * 100, 5 * 100}, Voltage.HV); + addProcessGT(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron, Materials.Iron}, Voltage.HV); + addProcessGT(CombType.DESH, new Materials[] {Materials.Desh, Materials.Titanium}, Voltage.EV); + addProcessGT(CombType.LEDOX, new Materials[] {Materials.Ledox, Materials.CallistoIce, Materials.Lead}, Voltage.EV); + addProcessGT(CombType.CALLISTOICE, new Materials[] {Materials.CallistoIce, Materials.Ledox, Materials.Lead}, Voltage.IV); + addProcessGT(CombType.MYTRYL, new Materials[] {Materials.Mytryl, Materials.Mithril}, Voltage.IV); + addProcessGT(CombType.QUANTIUM, new Materials[] {Materials.Quantium, Materials.Osmium}, Voltage.IV); + addProcessGT(CombType.ORIHARUKON, new Materials[] {Materials.Oriharukon, Materials.Lead}, Voltage.IV); + addProcessGT(CombType.MYSTERIOUSCRYSTAL, new Materials[] {Materials.MysteriousCrystal, Materials.Emerald}, Voltage.LUV); + addCentrifugeToMaterial(CombType.MYSTERIOUSCRYSTAL, new Materials[] {Materials.MysteriousCrystal, Materials.Emerald}, 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, Materials.Plutonium}, Voltage.LUV); + addProcessGT(CombType.TRINIUM, new Materials[] {Materials.Trinium, Materials.Iridium}, Voltage.ZPM); + if(!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron, Materials.Iron}, new int[] {85 * 100, 100 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.DESH, new Materials[] {Materials.Desh, Materials.Titanium}, new int[] {75 * 100, 50 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.LEDOX, new Materials[] {Materials.Ledox, Materials.CallistoIce, Materials.Lead}, new int[] {65 * 100, 55 * 100, 85 *100}, new int[] {}, Voltage.EV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.CALLISTOICE, new Materials[] {Materials.CallistoIce, Materials.Ledox, Materials.Lead}, new int[] {65 * 100, 75 * 100, 100 *100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.MYTRYL, new Materials[] {Materials.Mytryl, Materials.Mithril}, new int[] {55 * 100, 50 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.QUANTIUM, new Materials[] {Materials.Quantium, Materials.Osmium}, new int[] {50 * 100, 60 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.ORIHARUKON, new Materials[] {Materials.Oriharukon, Materials.Lead}, new int[] {50 * 100, 75 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.BLACKPLUTONIUM, new Materials[] {Materials.BlackPlutonium, Materials.Plutonium}, new int[] {25 * 100, 50 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); + addCentrifugeToMaterial(CombType.TRINIUM, new Materials[] {Materials.Trinium, Materials.Iridium}, new int[] {35 * 100, 45 * 100}, new int[] {}, Voltage.ZPM, NI, 30 * 100); + } //Planet Line - tComb = getStackForType(CombType.MOON); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MoonStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 120); - tComb = getStackForType(CombType.MARS); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MarsStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 480); - tComb = getStackForType(CombType.JUPITER); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.GanymedStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), new int[]{3000, 3000, 3000, 3000, 3000, 500}, 300, 480); - tComb = getStackForType(CombType.MERCURY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.MercuryStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 1920); - tComb = getStackForType(CombType.VENUS); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.VenusStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 1920); - tComb = getStackForType(CombType.SATURN); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.EnceladusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.TitanStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 7680); - tComb = getStackForType(CombType.URANUS); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MirandaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.OberonStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 7680); - tComb = getStackForType(CombType.NEPTUN); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.ProteusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.TritonStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 7680); - tComb = getStackForType(CombType.PLUTO); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.PlutoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.PlutoIceDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 30720); - tComb = getStackForType(CombType.HAUMEA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.HaumeaStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 30720); - tComb = getStackForType(CombType.MAKEMAKE); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MakeMakeStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 30720); - tComb = getStackForType(CombType.CENTAURI); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.CentauriASurfaceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CentauriAStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 122880); - tComb = getStackForType(CombType.TCETI); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.TCetiEStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 122880); - tComb = getStackForType(CombType.BARNARDA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.BarnardaEStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.BarnardaFStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 122880); - tComb = getStackForType(CombType.VEGA); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.VegaBStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 122880); - //Infinity Line - tComb = getStackForType(CombType.COSMICNEUTRONIUM); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CosmicNeutronium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Neutronium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 50, 100, 0, 0, 0}, 12000, 2000000); - tComb = getStackForType(CombType.INFINITYCATALYST); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfinityCatalyst, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Neutronium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 5, 100, 0, 0, 0}, 48000, 8000000); - tComb = getStackForType(CombType.INFINITY); - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Infinity, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfinityCatalyst, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 1, 5, 0, 0, 0}, 96000, 24000000); + addCentrifugeToItemStack(CombType.MOON, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.MarsStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.HV, 300); + addCentrifugeToItemStack(CombType.JUPITER, new ItemStack[] { GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.GanymedeStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "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("dreamcraft", "item.EnceladusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.MirandaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.ProteusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.PlutoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "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("dreamcraft", "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("dreamcraft", "item.CentauriASurfaceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "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("dreamcraft", "item.BarnardaEStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "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("dreamcraft", "item.VegaBStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); - } - public void addSpecialCentLV(ItemStack tComb, ItemStack aOutput, int chance){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 5000 }, 128, 5); - RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + //Infinity Line + addCentrifugeToMaterial(CombType.COSMICNEUTRONIUM, new Materials[] {Materials.CosmicNeutronium, Materials.Neutronium}, new int[] {(int) (0.5 * 100), 1 * 100}, new int[] {}, Voltage.UHV, 12000, NI, 50 * 100); + addCentrifugeToMaterial(CombType.INFINITYCATALYST, new Materials[] {Materials.InfinityCatalyst, Materials.Neutronium}, new int[] {(int) (0.05 * 100), 1 * 100}, new int[] {}, Voltage.UEV, 48000, NI, 50 * 100); + addCentrifugeToMaterial(CombType.INFINITY, new Materials[] {Materials.Infinity, Materials.InfinityCatalyst}, new int[] {(int) (0.01 * 100), (int) (0.05 * 100)}, new int[] {}, Voltage.UIV, 96000, NI, 50 * 100); } - public void addSpecialCentLV(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 5000, chance2 * 100 }, 128, 5); - RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f)); + /** + * Currently use for STEEL, GOLD, MOLYBDENUM, PLUTONIUM + * **/ + public void addChemicalProcess(CombType comb, Materials aInMaterial, Materials aOutMaterial, Voltage volt){ + if(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4) == NI) return; + RA.addChemicalRecipe(GT_Utility.copyAmount(9, getStackForType(comb)), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), volt.getComplexChemical(), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), NI, volt.getComplexTime(), volt.getChemicalEnergy(), volt.compareTo(Voltage.IV) > 0); } - public void addSpecialCentLV(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2, ItemStack aOutput3, int chance3){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, aOutput3, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 5000, chance2 * 100, chance3*100 }, 128, 5); - RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f,aOutput3,chance3*0.01f)); + /** + * Currently only used for CombType.MOLYBDENUM + * @param circuitNumber should not conflict with addProcessGT + * + * **/ + public void addAutoclaveProcess(CombType comb, Materials aMaterial, Voltage volt, int circuitNumber){ + if(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4) == NI) return; + RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, getStackForType(comb)), GT_Utility.getIntegratedCircuit(circuitNumber), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); } - public void addSpecialCentMV(ItemStack tComb, ItemStack aOutput, int chance){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput,GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 7000 }, 160, 120); - } - - public void addSpecialCentMV(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, chance2 * 100}, 160, 120); - } - - public void addSpecialCentHV(ItemStack tComb, ItemStack aOutput, int chance){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput,GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 7000 }, 196, 480); - } - - public void addSpecialCentHV(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, chance2 * 100}, 196, 480); - } - - public void addSpecialCentHV(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2, ItemStack aOutput3, int chance3){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, aOutput2, aOutput3, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, chance2 * 100, chance3 * 100 }, 196, 480); - } - - public void addProcessLV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 384, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); - RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + + /** + * this only adds Chemical and AutoClave process. + * If you need Centrifuge recipe. use addCentrifugeToMaterial or addCentrifugeToItemStack + * @param volt This determine the required Tier of process for this recipes. This decide the required aEU/t, progress time, required additional UU-Matter, requirement of cleanRoom, needed fluid stack for Chemical. + * @param aMaterial result of Material that should be generated by this process. + * **/ + public void addProcessGT(CombType comb, Materials[] aMaterial, Voltage volt) { + ItemStack tComb = getStackForType(comb); + for(int i=0; i < aMaterial.length; i++) { + if(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4)!= NI) { + RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial[i], 1), volt.getComplexChemical(), aMaterial[i].mOreByProducts.isEmpty() ? null : aMaterial[i].mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), NI, volt.getComplexTime(), volt.getChemicalEnergy(), volt.compareTo(Voltage.IV) > 0); + RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); + } } } - public void addProcessMV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), GT_ModHandler.getDistilledWater(1000L), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,128, 96); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 768, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 160, 120); + + /** + * 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, than the comb will product default Bee wax. But if aMaterial is more than 5, beeWax will be ignored in Gregtech Centrifuge. + * @param waxChance have same format like "chance" + **/ + public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, Voltage volt, ItemStack beeWax, int waxChance) { + addCentrifugeToMaterial(comb, aMaterial, chance, stackSize, volt, volt.getSimpleTime(), beeWax, waxChance); + } + public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, Voltage volt, int duration, ItemStack beeWax, int waxChance) { + ItemStack[] aOutPut = new ItemStack[aMaterial.length+1]; + stackSize = Arrays.copyOf(stackSize, aMaterial.length); + chance = Arrays.copyOf(chance, aOutPut.length); + chance[chance.length - 1] = waxChance; + for(int i = 0; i < (aMaterial.length); i++) { + if(chance[i] == 0) { + continue; + } + if(Math.max(1, stackSize[i]) % 9 == 0) { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], (Math.max(1, stackSize[i])/9) ); + }else if(Math.max(1, stackSize[i]) % 4 == 0) { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial[i], (Math.max(1, stackSize[i])/4) ); + }else { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial[i], Math.max(1, stackSize[i])); } - } - public void addProcessHV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Mercury.getFluid(144L), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,160, 384); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1),Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 1536, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 192, 480); } - } - public void addProcessEV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Mercury.getFluid(288L), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,192, 1536); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 3072, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 224, 1920); + if(beeWax != NI) { + aOutPut[aOutPut.length - 1] = beeWax; + }else { + aOutPut[aOutPut.length - 1] = ItemList.FR_Wax.get(1); } + + addCentrifugeToItemStack(comb, aOutPut, chance, volt, duration); } - public void addProcessIV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Mercury.getFluid(576L), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,224, 6144); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 6144, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 256, 7680); + + /** + * @param volt required Tier of system. If it's lower than MV, it will also add forestry centrifuge. + * @param aItem can be more than 6. but Over 6 will be ignored in Gregtech Centrifuge. + **/ + public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt) { + addCentrifugeToItemStack(comb, aItem, chance, volt, volt.getSimpleTime()); + } + public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt, int duration) { + ItemStack tComb = getStackForType(comb); + Builder<ItemStack,Float> Product = new ImmutableMap.Builder<ItemStack, Float>(); + for(int i=0; i < aItem.length; i++) { + if(aItem[i] == NI) { continue; } + Product.put(aItem[i],chance[i]/10000.0f); } - } - public void addProcessLUV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), FluidRegistry.getFluidStack("mutagen", 144), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,256, 24576, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 24576, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 288, 30720); + + if(volt.compareTo(Voltage.MV) < 0 || !GT_Mod.gregtechproxy.mNerfedCombs) { + RecipeManagers.centrifugeManager.addRecipe(40, tComb, Product.build()); } - } - public void addProcessZPM(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), FluidRegistry.getFluidStack("mutagen", 288), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI, 288, 100000, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+45)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 100000, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 320, 122880); + + aItem = Arrays.copyOf(aItem, 6); + if(aItem.length > 6) { + chance = Arrays.copyOf(chance, 6); } + + RA.addCentrifugeRecipe(tComb, NI, NF, NF, aItem[0], aItem[1], aItem[2], aItem[3], aItem[4], aItem[5], chance, duration, volt.getSimpleEnergy()); } - public void addProcessUV(ItemStack tComb, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), FluidRegistry.getFluidStack("mutagen", 576), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), GT_Values.NI,320, 400000, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+54)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), 100000, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 352, 500000); + + enum Voltage { + ULV, LV, MV, + HV, EV, IV, + LUV, ZPM, UV, + UHV, UEV, UIV, + UMV, UXV, OpV, + MAX; + public int getVoltage() { + return (int) V[this.ordinal()]; } - } - - public void addProcessLV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance) { - if (GT_Mod.gregtechproxy.mNerfedCombs) { - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), Materials.Water.getFluid(1000L), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI, 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass() +9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 384, false); - } else { - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{chance * 100, 3000}, 128, 5); - RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + /**@return aEU/t needed for chemical and autoclave process related to the Tier**/ + public int getChemicalEnergy() { + return this.getVoltage()*3/4; } - } - public void addProcessMV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), GT_ModHandler.getDistilledWater(1000L), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI,128, 96); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 768, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 160, 120); - } - - } - public void addProcessHV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), Materials.Mercury.getFluid(144L), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI,160, 384); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 1536, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 192, 480); + public int getAutoClaveEnergy() { + return (int) ((this.getVoltage()*3/4) * (Math.max(1, Math.pow(2, 5 - this.ordinal())))); } - - } - public void addProcessEV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+18)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 3072, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 224, 1920, true); + /**@return FluidStack needed for chemical process related to the Tier**/ + public FluidStack getComplexChemical() { + if(this.compareTo(Voltage.MV) < 0) { + return Materials.Water.getFluid((this.compareTo(Voltage.ULV) > 0) ? 1000 : 500); + }else if(this.compareTo(Voltage.HV) < 0) { + return GT_ModHandler.getDistilledWater(1000L); + }else if(this.compareTo(Voltage.LUV) < 0) { + return Materials.Mercury.getFluid((long) (Math.pow(2, this.compareTo(Voltage.HV)) * L)); + }else if(this.compareTo(Voltage.UHV) < 0) { + return FluidRegistry.getFluidStack("mutagen", (int) (Math.pow(2, this.compareTo(Voltage.LUV)) * L)); + }else { + return NF; + } } - - } - public void addProcessIV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+27)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 6144, false); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 256, 7680, true); + /**@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)); } - - } - public void addProcessLUV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), FluidRegistry.getFluidStack("mutagen", 144), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI, 256, 12288, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+36)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 24576, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 288, 30720, true); + /**@return duration needed for Chemical process related to the Tier**/ + public int getComplexTime() { + return 64 + this.ordinal() * 32; } - - } - public void addProcessZPM(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), FluidRegistry.getFluidStack("mutagen", 288), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI, 288, 500000, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+45)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 100000, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 320, 122880, true); + /**@return duration needed for Centrifuge process related to the Tier**/ + public int getSimpleTime() { + if(!GT_Mod.gregtechproxy.mNerfedCombs) { + return 96 + this.ordinal() * 32; + } else { + //ULV, LV needs 128ticks, MV need 256 ticks, HV need 384 ticks, EV need 512 ticks, IV need 640 ticks + return 128 * (Math.max(1, this.ordinal())); + } } - - } - public void addProcessUV(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), FluidRegistry.getFluidStack("mutagen", 576), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), GT_Values.NI, 320, 2000000, true); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(1), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+54)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 10000, (int) (aOutMaterial.getMass() * 128), 100000, true); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 352, 500000, true); + /**@return aEU/t needed for Centrifuge process related to the Tier**/ + public int getSimpleEnergy() { + if(this == Voltage.ULV) { + return 5; + }else { + return (int) (this.getVoltage() / 16) * 15; + } } - } } diff --git a/src/main/java/gregtech/common/items/ItemDrop.java b/src/main/java/gregtech/common/items/ItemDrop.java index 8452242049..61a81c678a 100644 --- a/src/main/java/gregtech/common/items/ItemDrop.java +++ b/src/main/java/gregtech/common/items/ItemDrop.java @@ -62,7 +62,8 @@ public class ItemDrop extends Item { return 2; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("forestry:honeyDrop.0"); this.secondIcon = par1IconRegister.registerIcon("forestry:honeyDrop.1"); @@ -129,4 +130,4 @@ public class ItemDrop extends Item { public void addProcessHV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance) { GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 480, 480); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/ItemPollen.java b/src/main/java/gregtech/common/items/ItemPollen.java index c3da0e7c1d..eaef49e02a 100644 --- a/src/main/java/gregtech/common/items/ItemPollen.java +++ b/src/main/java/gregtech/common/items/ItemPollen.java @@ -55,7 +55,8 @@ public class ItemPollen extends Item { return 2; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("forestry:pollen.0"); this.secondIcon = par1IconRegister.registerIcon("forestry:pollen.1"); diff --git a/src/main/java/gregtech/common/items/ItemPropolis.java b/src/main/java/gregtech/common/items/ItemPropolis.java index 20d18d4470..289536c2aa 100644 --- a/src/main/java/gregtech/common/items/ItemPropolis.java +++ b/src/main/java/gregtech/common/items/ItemPropolis.java @@ -51,7 +51,8 @@ public class ItemPropolis extends Item { } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("forestry:propolis.0"); } diff --git a/src/main/java/gregtech/common/items/PollenType.java b/src/main/java/gregtech/common/items/PollenType.java index 5bfb38e599..a4d670a0d0 100644 --- a/src/main/java/gregtech/common/items/PollenType.java +++ b/src/main/java/gregtech/common/items/PollenType.java @@ -24,11 +24,10 @@ public enum PollenType { } public String getName() { -// return "gt.comb."+this.name; return GT_LanguageManager.addStringLocalization("pollen." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Pollen"); } public int[] getColours() { return colours[this.ordinal()]; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/PropolisType.java b/src/main/java/gregtech/common/items/PropolisType.java index 3ea14555a0..04550e899b 100644 --- a/src/main/java/gregtech/common/items/PropolisType.java +++ b/src/main/java/gregtech/common/items/PropolisType.java @@ -48,4 +48,4 @@ public enum PropolisType { public int getColours() { return colours[this.ordinal()]; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java deleted file mode 100644 index 8ecc5766ba..0000000000 --- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java +++ /dev/null @@ -1,52 +0,0 @@ -package gregtech.common.items.armor; - -import gregtech.api.util.GT_ModHandler; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class ArmorCalculation { - public static float[] calculateArmor(ItemStack[] parts) { - return new float[32]; - } - - public static int deChargeBatterys(ItemStack[] parts, int amount) { - int decharged = 0; - for (int i = 0; decharged < amount && i < parts.length; i++) { - if (GT_ModHandler.isChargerItem(parts[i])) { - decharged = (int) (decharged + ic2.api.item.ElectricItem.manager.discharge(parts[i], amount - decharged, 10, false, false, false)); - } - } - return decharged; - } - - public static FluidStack getFluid(ItemStack[] parts, int tankCap) { - int fluidAmount; - if (parts.length > 12 && parts[12] != null) { - NBTTagCompound nbt = parts[12].getTagCompound(); - if (nbt != null) { - fluidAmount = (int) nbt.getLong("mFluidDisplayAmount"); - if (fluidAmount > tankCap) { - nbt.setLong("mFluidDisplayAmount", tankCap); - parts[12].setTagCompound(nbt); - fluidAmount = tankCap; - } - return new FluidStack(parts[12].getItemDamage(), fluidAmount); - } - - } - return null; - } - - public static void useFluid(ItemStack[] parts, int usedAmount) { - int fluidAmount; - if (parts.length > 12 && parts[12] != null) { - NBTTagCompound nbt = parts[12].getTagCompound(); - if (nbt != null) { - fluidAmount = (int) nbt.getLong("mFluidDisplayAmount"); - nbt.setLong("mFluidDisplayAmount", fluidAmount - usedAmount); - parts[12].setTagCompound(nbt); - } - } - } -} diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java deleted file mode 100644 index c8061db988..0000000000 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ /dev/null @@ -1,418 +0,0 @@ -package gregtech.common.items.armor; - -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.armor.components.ArmorComponent; -import gregtech.common.items.armor.components.StatType; -import gregtech.common.items.armor.gui.ContainerBasicArmor; -import gregtech.common.items.armor.gui.ContainerModularArmor; -import gregtech.common.items.armor.gui.InventoryArmor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.*; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - -public class ArmorData { - - public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; - public int armorTier; // 0 = Basic Modular Armor; 1 = Modular Exoskeleton; 2= Modular Nanosuit; 3 = Heavy Power Armor - public List info; // needs Localization - public boolean isTopItem; - public int tooltipUpdate; - public boolean openGui; - - public ArmorData helmet; - public ArmorData chestplate; - public ArmorData leggings; - public ArmorData boots; - - public Map<StatType,Float> mStat = new HashMap<StatType,Float>(); - public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>(); - static ArrayList<StatType> updateArmorStatTypeList; -// public boolean fullArmor; -// public boolean fullRadiationDef; -// public boolean fullElectricDef; -// -// public float fallDef; -// public float physicalDef; -// public float projectileDef; -// public float fireDef; -// public float magicDef; -// public float explosionDef; -// public float radiationDef; -// public float electricDef; -// public float witherDef; -// -// public float thorns; -// public float thornsSingle; -// public int magnet; -// public int magnetSingle; -// -// public int partsCharge; - public int maxCharge; - public int charge; -// public boolean thaumicGoggles; -// public boolean nightVision; -// public boolean potionInjector; -// public boolean autoFeeder; - - public FluidStack fluid; -// public int tankCap; -// -// public int weight; - public float maxWeight; -// public int processingPower; -// public int processingPowerUsed; -// public int partProcessing; -// public int partProcessingUsed; -// -// public int motorPower; -// public int motorEUusage; -// public int pistonJumpboost; -// public int pistonEUusage; -// public int electrolyzerProd; -// public int electrolyzerEUusage; -// public int fieldGenCap; -// public int fieldGenEUusage; -// -// public int jetpackMaxWeight; -// public int antiGravMaxWeight; - - public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) { - if(updateArmorStatTypeList == null) - { - updateArmorStatTypeList = new ArrayList<StatType>(); - updateArmorStatTypeList.add(StatType.MAGNET); - updateArmorStatTypeList.add(StatType.THORNS); - updateArmorStatTypeList.add(StatType.PROCESSINGPOWER); - updateArmorStatTypeList.add(StatType.PROCESSINGPOWERUSED); - } - this.type = type; - this.armorTier = tier; - ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) player, new InventoryArmor(ModularArmor_Item.class, stack)); - calculateArmor(tmp.mInvArmor.parts); - switch (tier) { - case 0: - maxCharge = 0; - break; - case 1: - maxCharge = 250000; - break; - case 2: - maxCharge = 1000000; - } - readNBT(stack.getTagCompound()); - } - - private void readNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; - } - if (nbt.hasKey("Charge")) { - this.charge = nbt.getInteger("Charge"); - } - } - - public void writeToNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; - } - nbt.setInteger("Charge", this.charge); - } - - public ArmorData calculateArmor(ItemStack[] parts) { - mStat.clear(); - mBStat.clear(); - for(ItemStack tPart : parts){ - if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName())) - ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this); - } - for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f); - for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false); - updateTooltip(); - return this; - } - - public void updateTooltip() { - List<String> tagList = new ArrayList<String>(); - String tmp2 = ""; - if (maxWeight > 4000) { - tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy"); - } - if (maxCharge != 0) { - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - if (type == 0) { - if (mBStat.get(StatType.THAUMICGOGGLES)) { - tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed")); - } - if (mBStat.get(StatType.NIGHTVISION)) { - tagList.add(GT_LanguageManager.getTranslation("Nightvision installed")); - } - } - tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE))); - if (type == 2) { - tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m"); - } - if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active")); - } - if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER)); - tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU"); - if (maxWeight > 4000) { - tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!")); - } - } - tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation("")); - tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation("")); - if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second")); - } - if (mStat.get(StatType.TANKCAP) > 0) { - if (fluid != null) { - tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")"); - } else { - tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP)); - } - } - } - tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2); - tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); - if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) { - tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence")); - } - if (mStat.get(StatType.THORNS) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS)); - } - if (mStat.get(StatType.MAGNET) > 0) { - tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m"); - } - if (mBStat.get(StatType.FULLRADIATIONARMOR)) { - tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence")); - } else { - if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) { - tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - } - } - info = tagList; - } - - public void armorPartsEquipped(EntityPlayer aPlayer) { - helmet = null; - chestplate = null; - leggings = null; - boots = null; - for (int i = 1; i < 5; i++) { - ItemStack stack = aPlayer.getEquipmentInSlot(i); - if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); - ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); - if ((this.type + i) == 4) { - fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP))); - } - if (maxCharge > 0 && charge < maxCharge) { - int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge); - charge = charge + loaded; - change(mStat, StatType.PARTSCHARGE, -loaded); - - } - switch (tmp.armorType) { - case 0: - helmet = tmp.data; - break; - case 1: - chestplate = tmp.data; - break; - case 2: - leggings = tmp.data; - break; - case 3: - boots = tmp.data; - break; - default: - break; - } - writeToNBT(stack.getTagCompound()); - } - } - if (helmet != null && chestplate != null && leggings != null && boots != null) { - set(mBStat, StatType.FULLARMOR, true); - boolean helmHasFullRadiationDefence=false; - boolean chestplateHasFullRadiationDefence=false; - boolean leggingsHasFullRadiationDefence=false; - boolean bootsHasFullRadiationDefence=false; - - boolean helmHasFullElectricalDefenceDefence=false; - boolean chestplateHasFullElectricalDefenceDefence=false; - boolean leggingsHasFullElectricalDefenceDefence=false; - boolean bootsHasFullElectricalDefenceDefence=false; - //Check each armor pieces for valid mStat value and verify that the Hash contains the StatType key - if(helmet.mStat!= null) - { - if(helmet.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - helmHasFullRadiationDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(helmet.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - helmHasFullElectricalDefenceDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - } - if(chestplate.mStat!= null) - { - if(chestplate.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - chestplateHasFullRadiationDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(chestplate.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - chestplateHasFullElectricalDefenceDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - } - if(leggings.mStat!= null) - { - if(leggings.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - leggingsHasFullRadiationDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(leggings.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - leggingsHasFullElectricalDefenceDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - } - if(boots.mStat!= null) - { - if(boots.mStat.containsKey(StatType.RADIATIONDEFENCE)) - { - bootsHasFullRadiationDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - if(boots.mStat.containsKey(StatType.ELECTRICALDEFENCE)) - { - bootsHasFullElectricalDefenceDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; - } - } - //Set Status of Full Armor types - set(mBStat, StatType.FULLRADIATIONARMOR, helmHasFullRadiationDefence&&chestplateHasFullRadiationDefence&&leggingsHasFullRadiationDefence &&bootsHasFullRadiationDefence); - set(mBStat, StatType.FULLELECTRICARMOR, helmHasFullElectricalDefenceDefence&&chestplateHasFullElectricalDefenceDefence&&leggingsHasFullElectricalDefenceDefence &&bootsHasFullElectricalDefenceDefence); - } else { - //Reset Full armor type status to false for all types if StatType.FULLARMOR is false - set(mBStat, StatType.FULLARMOR, false); - set(mBStat, StatType.FULLRADIATIONARMOR, false); - set(mBStat, StatType.FULLELECTRICARMOR, false); - } - - - set(mBStat, StatType.MAGNET, 0); - set(mBStat, StatType.THORNS, 0); - set(mBStat, StatType.PROCESSINGPOWER, 0); - set(mBStat, StatType.PROCESSINGPOWERUSED, 0); - - if (helmet != null) { - updateArmorStats(helmet,updateArmorStatTypeList ); - } - if (chestplate != null) { - updateArmorStats(chestplate,updateArmorStatTypeList ); - - } - if (leggings != null) { - updateArmorStats(leggings,updateArmorStatTypeList ); - - } - if (boots != null) { - updateArmorStats(boots,updateArmorStatTypeList ); - - } - isTopItem = false; - if (type == 0) { - isTopItem = true; - } else if (helmet == null && type == 1) { - isTopItem = true; - } else if (helmet == null && chestplate == null && type == 2) { - isTopItem = true; - } else if (helmet == null && chestplate == null && leggings == null && type == 3) { - isTopItem = true; - } - if (helmet != null) { - maxWeight = helmet.mStat.get(StatType.WEIGHT); - } - if (chestplate != null) { - maxWeight += chestplate.mStat.get(StatType.WEIGHT); - } - if (leggings != null) { - maxWeight += leggings.mStat.get(StatType.WEIGHT); - } - if (boots != null) { - maxWeight += boots.mStat.get(StatType.WEIGHT); - } - } - - private void updateArmorStats(ArmorData armorData, ArrayList<StatType> statTypes) { - for (StatType statType : statTypes) { - if(armorData == null || armorData.mStat == null || !armorData.mStat.containsKey(statType)) - continue; -// if(armorData != null && armorData.mStat != null && armorData.mStat.containsKey(statType)) -// { - set(mStat, statType, armorData.mStat.get(statType)); -// } - /*change(mStat, StatType.MAGNET, armorData.mStat.get(StatType.MAGNET)); - change(mStat, StatType.THORNS, armorData.mStat.get(StatType.THORNS)); - change(mStat, StatType.PROCESSINGPOWER, armorData.mStat.get(StatType.PROCESSINGPOWER)); - change(mStat, StatType.PROCESSINGPOWERUSED, armorData.mStat.get(StatType.PROCESSINGPOWERUSED));*/ - } - - - } - - public void set(Map aMap, StatType aType, boolean aSet){ - if(aMap.containsKey(aType))aMap.remove(aType); - aMap.put(aType, aSet); - } - - public void set(Map aMap, StatType aType, float aSet){ - if(aMap.containsKey(aType))aMap.remove(aType); - aMap.put(aType, aSet); - } - - public void change(Map aMap, StatType aType, float aChange){ - float tChange = 0; - if(aMap==null) - GT_FML_LOGGER.info("changeMapnull"); - if(aMap.containsKey(aType)){ - Object value = aMap.get(aType); - tChange = value != null ? (float) aMap.get(aType) : 0.0f; - aMap.remove(aType); - } - aMap.put(aType, (tChange + aChange)); - } - - public void dechargeComponents(int aCharge){ - - } - - public double getBaseAbsorptionRatio() { - switch (this.type) { - case 0: - return 0.15; - case 1: - return 0.40; - case 2: - return 0.30; - case 3: - return 0.15; - default: - return 0.00; - } - } -} diff --git a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java b/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java deleted file mode 100644 index d310fa4c96..0000000000 --- a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java +++ /dev/null @@ -1,37 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class ElectricModularArmor1 extends ModularArmor_Item{ - - public boolean mChargeProvider=false; - - public ElectricModularArmor1(int aArmorIndex, int aType, String name,int gui) { - super(aArmorIndex, aType, name,gui); - } - - public boolean canProvideEnergy(ItemStack aStack) { - return mChargeProvider; - } - - public Item getChargedItem(ItemStack aStack) { - return this; - } - - public Item getEmptyItem(ItemStack aStack) { - return this; - } - - public int getMaxCharge(ItemStack aStack) { - return data.charge; - } - - public int getTier(ItemStack aStack) { - return 2; - } - - public int getTransferLimit(ItemStack aStack) { - return openGuiNr==1?128:512; - } -} diff --git a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java deleted file mode 100644 index be0596fc92..0000000000 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ /dev/null @@ -1,460 +0,0 @@ -package gregtech.common.items.armor; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.damagesources.GT_DamageSources; -import gregtech.api.enums.GT_Values; -import gregtech.common.items.armor.components.StatType; -import gregtech.common.items.armor.gui.ContainerBasicArmor; -import gregtech.common.items.armor.gui.ContainerModularArmor; -import gregtech.common.items.armor.gui.InventoryArmor; -import ic2.core.IC2; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.LivingFallEvent; -import thaumcraft.api.IGoggles; -import thaumcraft.api.nodes.IRevealer; - -import java.util.LinkedList; -import java.util.List; - -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - -@Optional.InterfaceList(value = { @Optional.Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft", striprefs = true), - @Optional.Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft", striprefs = true) }) -public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGoggles, IRevealer { - - public String mName; - public int timer = 160; - public Item repairMaterial; - public int openGuiNr; - public ArmorData data; - public int jumpticks; - public int fail = 0; - - // public int maxEU; - - public ModularArmor_Item(int aArmorIndex, int aType, String name, int gui) { - super(ArmorMaterial.DIAMOND, aArmorIndex, aType); - MinecraftForge.EVENT_BUS.register(this); - setUnlocalizedName("gregtech:" + name); - GameRegistry.registerItem(this, name); - mName = name; - int mMaxDamage = (gui + 1) * 1024; - mMaxDamage *= getBaseAbsorptionRatio() * 2.5; - setMaxDamage(mMaxDamage); - repairMaterial = Items.leather; - openGuiNr = gui; - } - - @Override - public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - if (data == null) { - data = fillArmorData(aPlayer, aStack); - } - if (!aWorld.isRemote) { - aPlayer.openGui(GT_Values.GT, openGuiNr+1000, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ); - } - return aStack; - } - - @Override - public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (data == null) { - data = fillArmorData((EntityPlayer) player, armor); - } - if (player != null && armor != null && source != null) { - try{ - double tmp = 0.0d; - if (source.isMagicDamage()) { - tmp = data.mStat.get(StatType.MAGICDEFENCE); - } else if (source == GT_DamageSources.getRadioactiveDamage()) { - tmp = data.mStat.get(StatType.RADIATIONDEFENCE); - } else if (source == GT_DamageSources.getElectricDamage()) { - tmp = data.mStat.get(StatType.ELECTRICALDEFENCE); - } else if (source == DamageSource.wither) { - tmp = data.mStat.get(StatType.WITHERDEFENCE); - } else if (source.isFireDamage() || source == GT_DamageSources.getHeatDamage()) { - tmp = data.mStat.get(StatType.FIREDEFENCE); - } else if (source.isExplosion()) { - tmp = data.mStat.get(StatType.EXPLOSIONDEFENCE); - } else if (source.isProjectile()) { - tmp = data.mStat.get(StatType.PROJECTILEDEFENCE); - } else { - tmp = data.mStat.get(StatType.PHYSICALDEFENCE); - } - if (data.mStat.get(StatType.THORNS) > 0.1d && source != DamageSource.fall && source.getSourceOfDamage() != null) { - source.getSourceOfDamage().attackEntityFrom(new DamageSource("Thorns"), data.mStat.get(StatType.THORNS)); - } - - // fallDamage - if (source == DamageSource.fall) { - int fallDef = 0; - ItemStack stack = player.getEquipmentInSlot(1); - if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - fallDef = Math.round(data.boots.mStat.get(StatType.FALLDEFENCE)); - } - tmp = 1.0d - (fallDef > damage ? 0.0d : (1.0d - tmp) * 0.5d); - } - if (tmp == 0.0d) { - tmp = data.mStat.get(StatType.PHYSICALDEFENCE); - } - if (openGuiNr == 2) { - tmp = 1.0f - ((1.0f - tmp) / 2.0f); - } - return new ISpecialArmor.ArmorProperties(0, data.getBaseAbsorptionRatio() * tmp, 1000); - }catch(Exception e){System.err.println(e); - return new ISpecialArmor.ArmorProperties(0, 0, 0); - } - - } else { - return new ISpecialArmor.ArmorProperties(0, 0, 0); - } - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (data == null) { - data = fillArmorData(player, armor); - } - int tmp = (int) -Math.floor(-(data.getBaseAbsorptionRatio() * 20 * data.mStat.get(StatType.PHYSICALDEFENCE))); - - return tmp; - } - - public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b) { - if (data == null) { - data = fillArmorData(player, itemStack); - } - if (data.info != null) - info.addAll(data.info); - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - if (data == null) { - data = fillArmorData((EntityPlayer) entity, stack); - } - stack.damageItem(damage, entity); - ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) entity, new InventoryArmor(ModularArmor_Item.class, stack)); - if (stack.getItemDamage() > stack.getMaxDamage() / 2 && XSTR_INSTANCE.nextInt(100) < 5) { - tmp.getSlot(XSTR_INSTANCE.nextInt(tmp.getSlotCount())).decrStackSize(1); - tmp.mInvArmor.onGuiSaved((EntityPlayer) entity); - - /*public void eject(ItemStack drop) - { - if ((!IC2.platform.isSimulating()) || (drop == null)) { - return; - } - float f = 0.7F; - double d = this.worldObj.rand.nextFloat() * f + (1.0F - f) * 0.5D; - double d1 = this.worldObj.rand.nextFloat() * f + (1.0F - f) * 0.5D; - double d2 = this.worldObj.rand.nextFloat() * f + (1.0F - f) * 0.5D; - EntityItem entityitem = new EntityItem(this.worldObj, this.xCoord + d, this.yCoord + d1, this.zCoord + d2, drop); - entityitem.delayBeforeCanPickup = 10; - this.worldObj.spawnEntityInWorld(entityitem); - }*/ - - } - } - - @SubscribeEvent - public void onEntityLivingFallEvent(LivingFallEvent event) { - if (FMLCommonHandler.instance().getEffectiveSide().isServer() && event.entity instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entity; - ItemStack armor = player.inventory.armorInventory[0]; - if (data != null && event != null && data.type == 3 && data.charge >= data.mStat.get(StatType.PISTONEUUSAGE) && event.distance - 3 <= data.mStat.get(StatType.FALLDEFENCE)) { - event.setCanceled(true); - } else if (data != null && event != null && data.type == 3 && data.charge >= data.mStat.get(StatType.PISTONEUUSAGE)) { - event.distance -= data.mStat.get(StatType.FALLDEFENCE); - } - } - } - - @Override - public void onArmorTick(World aWorld, EntityPlayer aPlayer, ItemStack aStack) { - if(fail>0){ - fail--; - return; - } - try{ - if (data == null) { - data = fillArmorData(aPlayer, aStack); - } - if (data.tooltipUpdate > 40) { - data.armorPartsEquipped(aPlayer); - data.tooltipUpdate = 0; - data.updateTooltip(); - } else { - data.tooltipUpdate++; - } - if (aPlayer.onGround) { - jumpticks = 4; - } else { - jumpticks--; - } - - // Breathing - if (data.type == 0 && aPlayer.getAir() < 100 && data.fluid != null) { - int air = 0; - if (data.fluid.getUnlocalizedName().equals("fluid.oxygen") && data.fluid.amount >= 150) { - aPlayer.setAir(aPlayer.getAir() + 150); - air = 150; - } else if (data.fluid.getUnlocalizedName().equals("fluid.air") && data.fluid.amount >= 500) { - aPlayer.setAir(aPlayer.getAir() + 100); - air = 500; - } - if (air > 0) { - data.fluid.amount -= air; - ItemStack stack = aPlayer.getEquipmentInSlot(4); - if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); - ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); - ArmorCalculation.useFluid(tmp2.mInvArmor.parts, air); - } - } - } - // Fill Air Tank - if (data.tooltipUpdate == 40 && data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.type == 0 && data.fluid != null - && data.fluid.getUnlocalizedName().equals("oxygen") && data.fluid.amount < data.mStat.get(StatType.TANKCAP) && data.charge > data.mStat.get(StatType.ELECTROLYZEREUUSAGE)) { - data.charge -= data.mStat.get(StatType.ELECTROLYZEREUUSAGE); - ItemStack stack = aPlayer.getEquipmentInSlot(4); - if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); - ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); - ArmorCalculation.useFluid(tmp2.mInvArmor.parts, -Math.round(data.mStat.get(StatType.ELECTROLYZERPROD))); - } - } - - if (data.isTopItem) { - if(IC2.keyboard.isModeSwitchKeyDown(aPlayer)&&!aWorld.isRemote){ - int typeMod=0; - switch(data.type){ - case 0: - typeMod=400; - break; - case 1: - typeMod=300; - break; - case 2: - typeMod=200; - break; - case 3: - typeMod=100; - break; - } - aPlayer.openGui(GT_Values.GT, openGuiNr+(typeMod), aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ); - } -// if(data.helmet!=null&&data.helmet.openGui){data.helmet.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+400, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} -// if(data.chestplate!=null&&data.chestplate.openGui){data.chestplate.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+300, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} -// if(data.leggings!=null&&data.leggings.openGui){data.leggings.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+200, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} -// if(data.boots!=null&&data.boots.openGui){data.boots.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+100, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} - // Night Vision - if (timer >= 200) { - timer = 0; - if (data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.helmet != null && data.helmet.mBStat.get(StatType.NIGHTVISION) && data.charge > 3) { - aPlayer.addPotionEffect(new PotionEffect(Potion.nightVision.getId(), 500, -3)); - data.charge -= 4; - } else { - PotionEffect nv = aPlayer.getActivePotionEffect(Potion.nightVision); - if (nv != null && nv.getAmplifier() == -3) { - if (aPlayer.worldObj.isRemote) { - aPlayer.removePotionEffectClient(Potion.nightVision.id); - } else { - aPlayer.removePotionEffect(Potion.nightVision.id); - } - } - } - } else { - timer++; - } - - // Item Magnet - if (data.mStat.get(StatType.MAGNET) > 1) { - double x = aPlayer.posX; - double y = aPlayer.posY - (aPlayer.worldObj.isRemote ? 1.62 : 0) + 0.75; - double z = aPlayer.posZ; - int tMagnet = Math.round(data.mStat.get(StatType.MAGNET)); - List<EntityItem> items = aPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, - AxisAlignedBB.getBoundingBox(x - tMagnet, y - tMagnet, z - tMagnet, x + tMagnet, y + tMagnet, z + tMagnet)); - for (EntityItem item : items) { - ItemStack stack = item.getEntityItem(); - if (!item.isDead && stack != null) { - setEntityMotionFromVector(item, new Vector3(x, y, z), 0.45F); - } - } - } - // Weight limit calcuation - double motorSpeed = 0; - if (data.leggings != null) { - motorSpeed = data.leggings.mStat.get(StatType.MOTPRPOWER); - } - if (data.maxWeight > 4000) { - if (data.leggings != null && data.leggings.charge > data.leggings.mStat.get(StatType.MOTOREUUSAGE)) { - motorSpeed -= data.maxWeight - 4000; - data.leggings.charge -= (data.leggings.mStat.get(StatType.MOTOREUUSAGE) / 100); - } else { - aPlayer.motionX *= (4000.0d / data.maxWeight); - aPlayer.motionZ *= (4000.0d / data.maxWeight); - } - } - if (data.leggings != null && data.leggings.charge > data.leggings.mStat.get(StatType.MOTOREUUSAGE) && data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && motorSpeed > 0 - && aPlayer.isSprinting() && jumpticks > 0 - && (aPlayer.onGround && Math.abs(aPlayer.motionX) + Math.abs(aPlayer.motionZ) > 0.10000000149011612D)) { - data.leggings.charge -= data.leggings.mStat.get(StatType.MOTOREUUSAGE); - motorSpeed = Math.sqrt(motorSpeed) / 3; - - float var7 = (float) (0.02f * motorSpeed); - if (aPlayer.isInWater()) { - var7 = 0.1F; - if (aPlayer.motionY > 0) { - aPlayer.motionY += 0.10000000149011612D; - } - } - - if (var7 > 0.0F) { - aPlayer.moveFlying(0.0F, 1.0F, var7); - } - } - - // jump+step up assist - if (data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.leggings != null) { - double stepup = data.leggings.mStat.get(StatType.PISTONJUMPBOOST); - if (stepup > 1) { - aPlayer.stepHeight = 1.0f; - } - if (aWorld.isRemote && GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindJump)) { - if (stepup > 0 && jumpticks > 0) { - if (data.maxWeight > 2000) { - stepup *= 2000.0D / data.maxWeight; - } - aPlayer.motionY += 0.04 * stepup; - } - aPlayer.jumpMovementFactor = aPlayer.getAIMoveSpeed() * .2f; - } - - } - - // immune effect removal - List<PotionEffect> effects = new LinkedList(aPlayer.getActivePotionEffects()); - for (PotionEffect effect : effects) { - int id = effect.getPotionID(); - if (id == 24 && data.mBStat.get(StatType.FULLRADIATIONARMOR)) { - aPlayer.removePotionEffect(id); - } - } - } - }catch(Exception e){System.err.print(e); - fail = 200; - } - } - - public void setEntityMotionFromVector(Entity entity, Vector3 originalPosVector, float modifier) { - Vector3 entityVector = Vector3.fromEntityCenter(entity); - Vector3 finalVector = originalPosVector.copy().subtract(entityVector); - if (finalVector.mag() > 1) - finalVector.normalize(); - entity.motionX = finalVector.x * modifier; - entity.motionY = finalVector.y * modifier; - entity.motionZ = finalVector.z * modifier; - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return false; - } - - @Override - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aIconRegister) { - this.itemIcon = aIconRegister.registerIcon(GT_Values.MOD_ID+":" + mName); - } - - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - String armor=GT_Values.RES_PATH_ITEM+"armorhelmet.png"; - String tier=""; - try{ - if (data == null) { - data = fillArmorData((EntityPlayer) entity, stack); - } - if(this.data.armorTier==0){ - tier="basic"; - }else if(this.data.armorTier==1){ - tier="e1"; - }else if(this.data.armorTier==2){ - tier="e2"; - } - if(this.data.type==0||this.data.type==1||this.data.type==3){ - armor = GT_Values.RES_PATH_MODEL+"armor/"+tier+"_helmet_chest.png"; - }else{ - armor = GT_Values.RES_PATH_MODEL+"armor/"+tier+"_leggings_boots.png"; - }}catch(Exception e){System.err.println(e);} - return armor; - } - - @Override - public boolean showNodes(ItemStack aStack, EntityLivingBase aPlayer) { - if (data == null) { - data = fillArmorData((EntityPlayer) aPlayer, aStack); - } - return data.mBStat.get(StatType.THAUMICGOGGLES) && data.armorTier > 0 && data.charge > 0; - } - - @Override - public boolean showIngamePopups(ItemStack aStack, EntityLivingBase aPlayer) { - if (data == null) { - data = fillArmorData((EntityPlayer) aPlayer, aStack); - } - return data.mBStat.get(StatType.THAUMICGOGGLES) && data.armorTier > 0 && data.charge > 0; - } - - public ArmorData fillArmorData(EntityPlayer player, ItemStack stack) { - return new ArmorData(player, stack, this.armorType, openGuiNr); - } - - public double getBaseAbsorptionRatio() { - switch (this.armorType) { - case 0: - return 0.15; - case 1: - return 0.40; - case 2: - return 0.30; - case 3: - return 0.15; - default: - return 0.00; - } - } -} diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java deleted file mode 100644 index 2f79ff4c69..0000000000 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ /dev/null @@ -1,279 +0,0 @@ -package gregtech.common.items.armor; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Vec3; -import org.lwjgl.opengl.GL11; -import org.lwjgl.util.vector.Vector3f; -import org.lwjgl.util.vector.Vector4f; - -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; - -public class Vector3 { - public static Vector3 zero = new Vector3(); - public static Vector3 one = new Vector3(1, 1, 1); - public static Vector3 center = new Vector3(0.5, 0.5, 0.5); - public double x; - public double y; - public double z; - - public Vector3() { - } - - public Vector3(double d, double d1, double d2) { - x = d; - y = d1; - z = d2; - } - - public Vector3(Vector3 vec) { - x = vec.x; - y = vec.y; - z = vec.z; - } - - public Vector3(Vec3 vec) { - x = vec.xCoord; - y = vec.yCoord; - z = vec.zCoord; - } - - public Vector3 copy() { - return new Vector3(this); - } - - public static Vector3 fromEntity(Entity e) { - return new Vector3(e.posX, e.posY, e.posZ); - } - - public static Vector3 fromEntityCenter(Entity e) { - return new Vector3(e.posX, e.posY - e.yOffset + e.height / 2, e.posZ); - } - - public static Vector3 fromTileEntity(TileEntity e) { - return new Vector3(e.xCoord, e.yCoord, e.zCoord); - } - - public static Vector3 fromTileEntityCenter(TileEntity e) { - return new Vector3(e.xCoord + 0.5, e.yCoord + 0.5, e.zCoord + 0.5); - } - - public Vector3 set(double d, double d1, double d2) { - x = d; - y = d1; - z = d2; - return this; - } - - public Vector3 set(Vector3 vec) { - x = vec.x; - y = vec.y; - z = vec.z; - return this; - } - - public double dotProduct(Vector3 vec) { - double d = vec.x * x + vec.y * y + vec.z * z; - if (d > 1 && d < 1.00001) - d = 1; - else if (d < -1 && d > -1.00001) - d = -1; - return d; - } - - public double dotProduct(double d, double d1, double d2) { - return d * x + d1 * y + d2 * z; - } - - public Vector3 crossProduct(Vector3 vec) { - double d = y * vec.z - z * vec.y; - double d1 = z * vec.x - x * vec.z; - double d2 = x * vec.y - y * vec.x; - x = d; - y = d1; - z = d2; - return this; - } - - public Vector3 add(double d, double d1, double d2) { - x += d; - y += d1; - z += d2; - return this; - } - - public Vector3 add(Vector3 vec) { - x += vec.x; - y += vec.y; - z += vec.z; - return this; - } - - public Vector3 add(double d) { - return add(d, d, d); - } - - public Vector3 sub(Vector3 vec) { - return subtract(vec); - } - - public Vector3 subtract(Vector3 vec) { - x -= vec.x; - y -= vec.y; - z -= vec.z; - return this; - } - - public Vector3 negate(Vector3 vec) { - x = -x; - y = -y; - z = -z; - return this; - } - - public Vector3 multiply(double d) { - x *= d; - y *= d; - z *= d; - return this; - } - - public Vector3 multiply(Vector3 f) { - x *= f.x; - y *= f.y; - z *= f.z; - return this; - } - - public Vector3 multiply(double fx, double fy, double fz) { - x *= fx; - y *= fy; - z *= fz; - return this; - } - - public double mag() { - return Math.sqrt(x * x + y * y + z * z); - } - - public double magSquared() { - return x * x + y * y + z * z; - } - - public Vector3 normalize() { - double d = mag(); - if (d != 0) - multiply(1 / d); - return this; - } - - @Override - public String toString() { - MathContext cont = new MathContext(4, RoundingMode.HALF_UP); - return "Vector3(" + new BigDecimal(x, cont) + ", " + new BigDecimal(y, cont) + ", " + new BigDecimal(z, cont) + ")"; - } - - public Vector3 perpendicular() { - if (z == 0) - return zCrossProduct(); - return xCrossProduct(); - } - - public Vector3 xCrossProduct() { - double d = z; - double d1 = -y; - x = 0; - y = d; - z = d1; - return this; - } - - public Vector3 zCrossProduct() { - double d = y; - double d1 = -x; - x = d; - y = d1; - z = 0; - return this; - } - - public Vector3 yCrossProduct() { - double d = -z; - double d1 = x; - x = d; - y = 0; - z = d1; - return this; - } - - public Vec3 toVec3D() { - return Vec3.createVectorHelper(x, y, z); - } - - public double angle(Vector3 vec) { - return Math.acos(copy().normalize().dotProduct(vec.copy().normalize())); - } - - public boolean isInside(AxisAlignedBB aabb) { - return x >= aabb.minX && y >= aabb.maxY && z >= aabb.minZ && x < aabb.maxX && y < aabb.maxY && z < aabb.maxZ; - } - - public boolean isZero() { - return x == 0 && y == 0 && z == 0; - } - - public boolean isAxial() { - return x == 0 ? y == 0 || z == 0 : y == 0 && z == 0; - } - - @SideOnly(Side.CLIENT) - public Vector3f vector3f() { - return new Vector3f((float) x, (float) y, (float) z); - } - - @SideOnly(Side.CLIENT) - public Vector4f vector4f() { - return new Vector4f((float) x, (float) y, (float) z, 1); - } - - @SideOnly(Side.CLIENT) - public void glVertex() { - GL11.glVertex3d(x, y, z); - } - - public Vector3 negate() { - x = -x; - y = -y; - z = -z; - return this; - } - - public double scalarProject(Vector3 b) { - double l = b.mag(); - return l == 0 ? 0 : dotProduct(b) / l; - } - - public Vector3 project(Vector3 b) { - double l = b.magSquared(); - if (l == 0) { - set(0, 0, 0); - return this; - } - double m = dotProduct(b) / l; - set(b).multiply(m); - return this; - } - - @Override - public boolean equals(Object o) { - if (!(o instanceof Vector3)) - return false; - Vector3 v = (Vector3) o; - return x == v.x && y == v.y && z == v.z; - } -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java deleted file mode 100644 index ea2f0184dd..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java +++ /dev/null @@ -1,63 +0,0 @@ -package gregtech.common.items.armor.components; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.HashMap; -import java.util.Map; - -public abstract class ArmorComponent implements IArmorComponent { - public ItemStack mStack; - public String mOreDict; - public String mConfigName; - public static Map<String, ArmorComponent> mOreDicts = new HashMap<String, ArmorComponent>(); - public static Map<String, ArmorComponent> mStacks = new HashMap<String, ArmorComponent>(); - public Map<StatType,Float> mStat = new HashMap<StatType,Float>(); - public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>(); - - public ArmorComponent(String aName, String aOreDict, boolean aElectric, float aWeight){ - mConfigName = aName; - if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return; - mOreDict = GregTech_API.sModularArmor.get( mConfigName, "OreDict", aOreDict); - mBStat.put(StatType.ELECTRIC, aElectric); - mOreDicts.put(aOreDict, this); - for(ItemStack tStack : OreDictionary.getOres(aOreDict))if(tStack!=null)mStacks.put(tStack.getUnlocalizedName(), this); - mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight)); - } - - public ArmorComponent(String aName, ItemStack aStack, boolean aElectric, float aWeight){ - mConfigName = aName; - String tStackName = GregTech_API.sModularArmor.get( mConfigName, "Stack", GameRegistry.findUniqueIdentifierFor(aStack.getItem()).toString()+(aStack.getItemDamage()==0 ? "" : ":"+aStack.getItemDamage())); - mStack = GameRegistry.findItemStack(tStackName.split(":")[0], tStackName.split(":")[1], 1); - if(tStackName.split(":").length>2)mStack.setItemDamage(Integer.parseInt(tStackName.split(":")[2])); - if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return; - mStack = aStack; - mBStat.put(StatType.ELECTRIC, aElectric); - mStacks.put(aStack.getUnlocalizedName(), this); - mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight)); - } - - @Override - public boolean isArmorComponent(ItemStack aStack) { - if(mStack!=null && GT_Utility.areStacksEqual(mStack, aStack, true)){return true;} - if(mOreDict!=null){ - for(ItemStack tStack : OreDictionary.getOres(mOreDict)) - if(GT_Utility.areStacksEqual(tStack, aStack, true))return true;} - return false; - } - - public void addVal(StatType aType, ArmorData aArmorData){ - float tArmorDef = 0.0f; - if(aArmorData.mStat.containsKey(aType)){ - tArmorDef = aArmorData.mStat.get(aType); - aArmorData.mStat.remove(aType);} - aArmorData.mStat.put(aType, tArmorDef + mStat.get(aType)); - } - - public abstract void calculateArmor(ArmorData aArmorData); - -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java deleted file mode 100644 index 15946863fb..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java +++ /dev/null @@ -1,18 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.api.GregTech_API; -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; - -public class ArmorComponentBattery extends ArmorComponent{ - public ArmorComponentBattery(String aName, ItemStack aStack, boolean aElectric, float aWeight, float aBatteryCapacity) { - super(aName, aStack, aElectric, aWeight); - mStat.put(StatType.BATTERYCAPACITY, (float) GregTech_API.sModularArmor.get( mConfigName, "ProcessingUsed", aBatteryCapacity)); - } - - @Override - public void calculateArmor(ArmorData aArmorData) { - addVal(StatType.BATTERYCAPACITY, aArmorData); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java deleted file mode 100644 index dcdc59d19c..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java +++ /dev/null @@ -1,21 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.api.GregTech_API; -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; - -public class ArmorComponentFunction extends ArmorComponent{ - StatType mType; - public ArmorComponentFunction(String aName, ItemStack aStack, boolean aElectric, float aWeight, StatType aType, float aProcessingUsed) { - super(aName, aStack, aElectric, aWeight); - mType = StatType.valueOf(GregTech_API.sModularArmor.get(mConfigName, "StatType", aType.toString())); - mStat.put(StatType.PROCESSINGPOWERUSED, (float) GregTech_API.sModularArmor.get( mConfigName, "ProcessingUsed", aProcessingUsed)); - } - - @Override - public void calculateArmor(ArmorData aArmorData) { - addVal(StatType.PROCESSINGPOWERUSED, aArmorData); - if(!aArmorData.mBStat.containsKey(mType))aArmorData.mBStat.put(mType, true); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java deleted file mode 100644 index 3e9e22ee28..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java +++ /dev/null @@ -1,31 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.api.GregTech_API; -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; - -public class ArmorElectricComponent extends ArmorComponent{ - StatType mType1; - StatType mType2; - StatType mType3; - - public ArmorElectricComponent(String aName, ItemStack aStack, float aWeight, StatType aType1, float aValue1, StatType aType2, float aValue2, StatType aType3, float aValue3) { - super(aName, aStack, true, aWeight); - mType1 = StatType.valueOf(GregTech_API.sModularArmor.get(mConfigName, "StatType", aType1.toString())); - String tType2 = GregTech_API.sModularArmor.get(mConfigName, "StatType", aType2==null ? "null" : aType2.toString()); - mType2 = tType2.equals("null") ? null : StatType.valueOf(tType2); - String tType3 = GregTech_API.sModularArmor.get(mConfigName, "StatType", aType3==null ? "null" : aType3.toString()); - mType3 = tType3.equals("null") ? null : StatType.valueOf(tType3); - mStat.put(aType1, (float) GregTech_API.sModularArmor.get( mConfigName, "Value1", aValue1)); - if(mType2!=null)mStat.put(mType2, (float) GregTech_API.sModularArmor.get( mConfigName, "Value2", aValue2)); - if(mType3!=null)mStat.put(mType3, (float) GregTech_API.sModularArmor.get( mConfigName, "Value3", aValue3)); - } - - @Override - public void calculateArmor(ArmorData aArmorData) { - addVal(mType1, aArmorData); - if(mType2!=null)addVal(mType2, aArmorData); - if(mType3!=null)addVal(mType3, aArmorData); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java b/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java deleted file mode 100644 index 2e02ac7ba6..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java +++ /dev/null @@ -1,112 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.api.GregTech_API; -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; - -public class ArmorPlating extends ArmorComponent{ - StatType mType; - public ArmorPlating(String aName, ItemStack aStack, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { - super(aName, aStack, false, aWeight); - aPhysicalDef = (float) GregTech_API.sModularArmor.get( mConfigName, "PhysicalDef", aPhysicalDef); - aProjectileDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ProjectileDef", aProjectileDef); - aFireDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FireDef", aFireDef); - aMagicDef = (float) GregTech_API.sModularArmor.get( mConfigName, "MagicDef", aMagicDef); - aExplosionDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ExplosionDef", aExplosionDef); - aFallDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FallDef", aFallDef); - aRadiationDef = (float) GregTech_API.sModularArmor.get( mConfigName, "RadiationDef", aRadiationDef); - aElectricDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ElectricalDef", aElectricDef); - aWitherDef = (float) GregTech_API.sModularArmor.get( mConfigName, "WitherDef", aWitherDef); - addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); - } - - public ArmorPlating(String aName, String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { - super(aName, aOreDict, false, aWeight); - aPhysicalDef = (float) GregTech_API.sModularArmor.get( mConfigName, "PhysicalDef", aPhysicalDef); - aProjectileDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ProjectileDef", aProjectileDef); - aFireDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FireDef", aFireDef); - aMagicDef = (float) GregTech_API.sModularArmor.get( mConfigName, "MagicDef", aMagicDef); - aExplosionDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ExplosionDef", aExplosionDef); - aFallDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FallDef", aFallDef); - aRadiationDef = (float) GregTech_API.sModularArmor.get( mConfigName, "RadiationDef", aRadiationDef); - aElectricDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ElectricalDef", aElectricDef); - aWitherDef = (float) GregTech_API.sModularArmor.get( mConfigName, "WitherDef", aWitherDef); - addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); - } - - public ArmorPlating(String aName, String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef, StatType aType, float aSpecial) { - super(aName, aOreDict, false, aWeight); - aPhysicalDef = (float) GregTech_API.sModularArmor.get( mConfigName, "PhysicalDef", aPhysicalDef); - aProjectileDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ProjectileDef", aProjectileDef); - aFireDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FireDef", aFireDef); - aMagicDef = (float) GregTech_API.sModularArmor.get( mConfigName, "MagicDef", aMagicDef); - aExplosionDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ExplosionDef", aExplosionDef); - aFallDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FallDef", aFallDef); - aRadiationDef = (float) GregTech_API.sModularArmor.get( mConfigName, "RadiationDef", aRadiationDef); - aElectricDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ElectricalDef", aElectricDef); - aWitherDef = (float) GregTech_API.sModularArmor.get( mConfigName, "WitherDef", aWitherDef); - addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); - mType = StatType.valueOf(GregTech_API.sModularArmor.get(mConfigName, "StatType", aType.toString())); - mStat.put(mType, (float) GregTech_API.sModularArmor.get( mConfigName, "SpecialType", aSpecial)); - } - - public ArmorPlating(String aName, String aOreDict,float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef) { - super(aName, aOreDict, false, aWeight); - aPhysicalDef = (float) GregTech_API.sModularArmor.get( mConfigName, "PhysicalDef", aPhysicalDef); - aProjectileDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ProjectileDef", aProjectileDef); - aFireDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FireDef", aFireDef); - aMagicDef = (float) GregTech_API.sModularArmor.get( mConfigName, "MagicDef", aMagicDef); - aExplosionDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ExplosionDef", aExplosionDef); - float aFallDef = (float) GregTech_API.sModularArmor.get( mConfigName, "FallDef", 0.0f); - float aRadiationDef = (float) GregTech_API.sModularArmor.get( mConfigName, "RadiationDef", 0.0f); - float aElectricDef = (float) GregTech_API.sModularArmor.get( mConfigName, "ElectricalDef", 0.0f); - float aWitherDef = (float) GregTech_API.sModularArmor.get( mConfigName, "WitherDef", 0.0f); - addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); - } - - public void addStats(float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef){ - mStat.put(StatType.FALLDEFENCE, aFallDef); - mStat.put(StatType.PHYSICALDEFENCE, aPhysicalDef); - mStat.put(StatType.PROJECTILEDEFENCE, aProjectileDef); - mStat.put(StatType.FIREDEFENCE, aFireDef); - mStat.put(StatType.MAGICDEFENCE, aMagicDef); - mStat.put(StatType.EXPLOSIONDEFENCE, aExplosionDef); - mStat.put(StatType.RADIATIONDEFENCE, aRadiationDef); - mStat.put(StatType.ELECTRICALDEFENCE, aElectricDef); - mStat.put(StatType.WITHERDEFENCE, aWitherDef); - } - - @Override - public void calculateArmor(ArmorData aArmorData) { - calDefAdd(StatType.FALLDEFENCE, aArmorData); - calDef(StatType.PHYSICALDEFENCE, aArmorData); - calDef(StatType.PROJECTILEDEFENCE, aArmorData); - calDef(StatType.FIREDEFENCE, aArmorData); - calDef(StatType.MAGICDEFENCE, aArmorData); - calDef(StatType.EXPLOSIONDEFENCE, aArmorData); - calDef(StatType.RADIATIONDEFENCE, aArmorData); - calDef(StatType.ELECTRICALDEFENCE, aArmorData); - calDef(StatType.WITHERDEFENCE, aArmorData); - addVal(StatType.WEIGHT, aArmorData); - if(mType!=null)addVal(mType, aArmorData); - } - - public void calDef(StatType aType, ArmorData aArmorData){ - float tArmorDef = 0.0f; - if(aArmorData.mStat.containsKey(aType)){ - tArmorDef = aArmorData.mStat.get(aType); - aArmorData.mStat.remove(aType);} - float tComponentDef = mStat.get(aType); - aArmorData.mStat.put(aType, tArmorDef + ((1.0f -tArmorDef) * tComponentDef)); - } - - public void calDefAdd(StatType aType, ArmorData aArmorData){ - float tArmorDef = 0.0f; - if(aArmorData.mStat.containsKey(aType)){ - tArmorDef = aArmorData.mStat.get(aType); - aArmorData.mStat.remove(aType);} - float tComponentDef = mStat.get(aType); - aArmorData.mStat.put(aType, tArmorDef + tComponentDef); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java deleted file mode 100644 index 340601b354..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java +++ /dev/null @@ -1,11 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.common.items.armor.ArmorData; -import net.minecraft.item.ItemStack; - -public interface IArmorComponent { - - boolean isArmorComponent(ItemStack aStack); - - void calculateArmor(ArmorData aArmorData); -} diff --git a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java deleted file mode 100644 index bea0e2b5b4..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java +++ /dev/null @@ -1,250 +0,0 @@ -package gregtech.common.items.armor.components; - -import gregtech.api.GregTech_API; -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.Blocks; -import net.minecraft.item.ItemStack; - -public class LoadArmorComponents { - public static void init(){ - - new ArmorPlating("plateRubber", "plateRubber", 60, 0.06f, 0.06f, 0.02f, 0.10f, 0.10f, 2f, 0f, .25f, 0f); - new ArmorPlating("plateWood", "plateWood", 80, 0.08f, 0.09f, 0.02f, 0.08f, 0.08f); - new ArmorPlating("plateBrass", "plateBrass", 140, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); - new ArmorPlating("plateCopper", "plateCopper", 140, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); - new ArmorPlating("plateLead", "plateLead", 280, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0, .3f, 0, 0); - new ArmorPlating("platePlastic", "platePlastic", 60, 0.10f, 0.10f, 0.02f, 0.02f, 0.10f, 0, 0, .25f, 0); - new ArmorPlating("plateAluminium", "plateAluminium", 120, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); - new ArmorPlating("plateAstralSilver", "plateAstralSilver", 180, 0.10f, 0.10f, 0.10f, 0.18f, 0.10f); - new ArmorPlating("plateBismuthBronze", "plateBismuthBronze", 160, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); - new ArmorPlating("plateBlackBronze", "plateBlackBronze", 160, 0.13f, 0.13f, 0.10f, 0.10f, 0.13f); - new ArmorPlating("plateBlackSteel", "plateBlackSteel", 200, 0.19f, 0.19f, 0.17f, 0.17f, 0.19f); - new ArmorPlating("plateBlueSteel", "plateBlueSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); - new ArmorPlating("plateBronze", "plateBronze", 160, 0.13f, 0.13f, 0.12f, 0.12f, 0.13f); - new ArmorPlating("plateCobaltBrass", "plateCobaltBrass", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); - new ArmorPlating("plateDamascusSteel", "plateDamascusSteel", 200, 0.22f, 0.22f, 0.20f, 0.20f, 0.22f); - new ArmorPlating("plateElectrum", "plateElectrum", 250, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); - new ArmorPlating("plateEmerald", "plateEmerald", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateGold", "plateGold", 300, 0.09f, 0.09f, 0.05f, 0.25f, 0.09f); - new ArmorPlating("plateGreenSapphire", "plateGreenSapphire", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateInvar", "plateInvar", 190, 0.10f, 0.10f, 0.22f, 0.22f, 0.10f); - new ArmorPlating("plateIron", "plateIron", 200, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); - new ArmorPlating("plateIronWood", "plateIronWood", 150, 0.17f, 0.17f, 0.02f, 0.02f, 0.17f); - new ArmorPlating("plateMagnalium", "plateMagnalium", 120, 0.15f, 0.15f, 0.17f, 0.17f, 0.15f); - new ArmorPlating("plateNeodymiumMagnetic","plateNeodymiumMagnetic",220, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f, 0, 0, 0, 0, StatType.MAGNETSINGLE, 2.0f); - new ArmorPlating("plateManganese", "plateManganese", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); - new ArmorPlating("plateMeteoricIron", "plateMeteoricIron", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); - new ArmorPlating("plateMeteoricSteel", "plateMeteoricSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); - new ArmorPlating("plateMolybdenum", "plateMolybdenum", 140, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f); - new ArmorPlating("plateNickel", "plateNickel", 180, 0.12f, 0.12f, 0.15f, 0.15f, 0.12f); - new ArmorPlating("plateOlivine", "plateOlivine", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateOpal", "plateOpal", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("platePalladium", "platePalladium", 280, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); - new ArmorPlating("platePlatinum", "platePlatinum", 290, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); - new ArmorPlating("plateGarnetRed", "plateGarnetRed", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateRedSteel", "plateRedSteel", 200, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); - new ArmorPlating("plateRoseGold", "plateRoseGold", 240, 0.10f, 0.10f, 0.08f, 0.18f, 0.10f); - new ArmorPlating("plateRuby", "plateRuby", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); - new ArmorPlating("plateSapphire", "plateSapphire", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateSilver", "plateSilver", 220, 0.11f, 0.11f, 0.07f, 0.24f, 0.11f); - new ArmorPlating("plateStainlessSteel", "plateStainlessSteel", 200, 0.16f, 0.16f, 0.21f, 0.21f, 0.16f); - new ArmorPlating("plateSteel", "plateSteel", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); - new ArmorPlating("plateSterlingSilver", "plateSterlingSilver", 210, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); - new ArmorPlating("plateTanzanite", "plateTanzanite", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateThorium", "plateThorium", 280, 0.13f, 0.13f, 0.16f, 0.16f, 0.13f); - new ArmorPlating("plateWroughtIron", "plateWroughtIron", 200, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); - new ArmorPlating("plateGarnetYellow", "plateGarnetYellow", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateAlloyCarbon", "plateAlloyCarbon", 60, 0.06f, 0.23f, 0.05f, 0.05f, 0.06f); - new ArmorPlating("plateInfusedAir", "plateInfusedAir", 10, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f); - new ArmorPlating("plateAmethyst", "plateAmethyst", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateInfusedWater", "plateInfusedWater", 150, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); - new ArmorPlating("plateBlueTopaz", "plateBlueTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateChrome", "plateChrome", 200, 0.12f, 0.12f, 0.21f, 0.21f, 0.12f); - new ArmorPlating("plateCobalt", "plateCobalt", 220, 0.16f, 0.16f, 0.14f, 0.14f, 0.16f); - new ArmorPlating("plateDarkIron", "plateDarkIron", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); - new ArmorPlating("plateDiamond", "plateDiamond", 200, 0.20f, 0.20f, 0.22f, 0.22f, 0.20f); - new ArmorPlating("plateEnderium", "plateEnderium", 250, 0.22f, 0.22f, 0.21f, 0.21f, 0.22f); - new ArmorPlating("plateElectrumFlux", "plateElectrumFlux", 180, 0.19f, 0.19f, 0.16f, 0.16f, 0.19f); - new ArmorPlating("plateForce", "plateForce", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); - new ArmorPlating("plateHSLA", "plateHSLA", 200, 0.21f, 0.21f, 0.17f, 0.17f, 0.21f); - new ArmorPlating("plateInfusedFire", "plateInfusedFire", 150, 0.12f, 0.10f, 0.30f, 0.30f, 0.12f, 0, 0, 0, 0, StatType.THORNSSINGLE, 3.0f); - new ArmorPlating("plateInfusedGold", "plateInfusedGold", 300, 0.15f, 0.15f, 0.05f, 0.05f, 0.15f); - new ArmorPlating("plateMithril", "plateMithril", 200, 0.25f, 0.25f, 0.10f, 0.30f, 0.25f); - new ArmorPlating("plateInfusedOrder", "plateInfusedOrder", 150, 0.18f, 0.22f, 0.22f, 0.25f, 0.22f); - new ArmorPlating("plateSteeleaf", "plateSteeleaf", 120, 0.16f, 0.16f, 0.06f, 0.06f, 0.16f); - new ArmorPlating("plateInfusedEarth", "plateInfusedEarth", 350, 0.30f, 0.30f, 0.30f, 0.30f, 0.30f); - new ArmorPlating("plateThaumium", "plateThaumium", 200, 0.18f, 0.19f, 0.20f, 0.30f, 0.18f); - new ArmorPlating("plateTitanium", "plateTitanium", 140, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); - new ArmorPlating("plateTungsten", "plateTungsten", 270, 0.27f, 0.26f, 0.23f, 0.26f, 0.26f); - new ArmorPlating("plateUltimet", "plateTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); - new ArmorPlating("plateUltimet", "plateUltimet", 180, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); - new ArmorPlating("plateUranium", "plateUranium", 290, 0.27f, 0.23f, 0.20f, 0.15f, 0.21f); - new ArmorPlating("plateVinteum", "plateVinteum", 180, 0.10f, 0.12f, 0.14f, 0.28f, 0.12f); - new ArmorPlating("plateDuranium", "plateDuranium", 140, 0.24f, 0.24f, 0.24f, 0.24f, 0.24f); - new ArmorPlating("plateAlloyIridium", "plateAlloyIridium", 220, 0.24f, 0.24f, 0.22f, 0.22f, 0.24f); - new ArmorPlating("plateOsmiridium", "plateOsmiridium", 240, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); - new ArmorPlating("plateOsmium", "plateOsmium", 250, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); - new ArmorPlating("plateNaquadah", "plateNaquadah", 250, 0.27f, 0.27f, 0.25f, 0.25f, 0.27f); - new ArmorPlating("plateNetherStar", "plateNetherStar", 140, 0.22f, 0.22f, 0.24f, 0.24f, 0.22f, 0, 0, 0, .2f); - new ArmorPlating("plateInfusedEntropy", "plateInfusedEntropy", 150, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f, 0, 0, 0, 0, StatType.THORNSSINGLE, 4.0f); - new ArmorPlating("plateTritanium", "plateTritanium", 140, 0.26f, 0.26f, 0.26f, 0.26f, 0.26f); - new ArmorPlating("plateTungstenSteel", "plateTungstenSteel", 270, 0.30f, 0.28f, 0.25f, 0.28f, 0.30f); - new ArmorPlating("plateAdamantium", "plateAdamantium", 200, 0.28f, 0.28f, 0.26f, 0.30f, 0.30f); - new ArmorPlating("plateNaquadahAlloy", "plateNaquadahAlloy", 300, 0.33f, 0.33f, 0.33f, 0.33f, 0.33f); - new ArmorPlating("plateNeutronium", "plateNeutronium", 600, 0.50f, 0.50f, 0.50f, 0.50f, 0.50f); - - new ArmorComponentFunction("componentnightvision", GT_ModHandler.getIC2Item("nightvisionGoggles", 1), true, 100, StatType.NIGHTVISION, 100); - if(GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1)!=null)new ArmorComponentFunction("componentthaumicgoggles", GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1), true, 100, StatType.THAUMICGOGGLES, 100); - new ArmorComponentBattery("batteryLVLI", ItemList.Battery_RE_LV_Lithium.get(1, new Object[]{}), true, 100, 100000); - new ArmorComponentBattery("batteryMVLI", ItemList.Battery_RE_MV_Lithium.get(1, new Object[]{}), true, 100, 400000); - new ArmorComponentBattery("batteryHVLI", ItemList.Battery_RE_HV_Lithium.get(1, new Object[]{}), true, 100, 1600000); - - new ArmorComponentBattery("batteryLVCA", ItemList.Battery_RE_LV_Cadmium.get(1, new Object[]{}), true, 100, 75000); - new ArmorComponentBattery("batteryMVCA", ItemList.Battery_RE_MV_Cadmium.get(1, new Object[]{}), true, 100, 300000); - new ArmorComponentBattery("batteryHVCA", ItemList.Battery_RE_HV_Cadmium.get(1, new Object[]{}), true, 100, 1200000); - - new ArmorComponentBattery("batteryLVSO", ItemList.Battery_RE_LV_Sodium.get(1, new Object[]{}), true, 100, 50000); - new ArmorComponentBattery("batteryMVSO", ItemList.Battery_RE_MV_Sodium.get(1, new Object[]{}), true, 100, 200000); - new ArmorComponentBattery("batteryHVSO", ItemList.Battery_RE_HV_Sodium.get(1, new Object[]{}), true, 100, 800000); - - new ArmorComponentBattery("batterycystal", ItemList.IC2_EnergyCrystal.get(1, new Object[]{}), true, 100, 1000000); - new ArmorComponentBattery("batterylapotron", ItemList.IC2_LapotronCrystal.get(1, new Object[]{}), true, 100, 10000000); - new ArmorComponentBattery("batterylapoorb", ItemList.Energy_LapotronicOrb.get(1, new Object[]{}), true, 100, 100000000); - new ArmorComponentBattery("batteryorbcluster", ItemList.Energy_LapotronicOrb2.get(1, new Object[]{}), true, 100, 1000000000); - - new ArmorElectricComponent("motorlv", ItemList.Electric_Motor_LV.get(1, new Object[]{}), 20, StatType.MOTPRPOWER, 200f, StatType.MOTOREUUSAGE, 50f, StatType.PROCESSINGPOWERUSED, 10f); - new ArmorElectricComponent("motormv", ItemList.Electric_Motor_MV.get(1, new Object[]{}), 40, StatType.MOTPRPOWER, 300f, StatType.MOTOREUUSAGE, 100f, StatType.PROCESSINGPOWERUSED, 20f); - new ArmorElectricComponent("motorhv", ItemList.Electric_Motor_HV.get(1, new Object[]{}), 60, StatType.MOTPRPOWER, 400f, StatType.MOTOREUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 50f); - new ArmorElectricComponent("motorev", ItemList.Electric_Motor_EV.get(1, new Object[]{}), 80, StatType.MOTPRPOWER, 500f, StatType.MOTOREUUSAGE, 400f, StatType.PROCESSINGPOWERUSED, 100f); - new ArmorElectricComponent("motoriv", ItemList.Electric_Motor_IV.get(1, new Object[]{}),100, StatType.MOTPRPOWER, 600f, StatType.MOTOREUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 200f); - - new ArmorElectricComponent("pistonlv", ItemList.Electric_Piston_LV.get(1, new Object[]{}), 20, StatType.PISTONJUMPBOOST, 3, StatType.PISTONEUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 10f); - new ArmorElectricComponent("pistonmv", ItemList.Electric_Piston_MV.get(1, new Object[]{}), 40, StatType.PISTONJUMPBOOST, 4, StatType.PISTONEUUSAGE, 300f, StatType.PROCESSINGPOWERUSED, 20f); - new ArmorElectricComponent("pistonhv", ItemList.Electric_Piston_HV.get(1, new Object[]{}), 60, StatType.PISTONJUMPBOOST, 5, StatType.PISTONEUUSAGE, 450f, StatType.PROCESSINGPOWERUSED, 50f); - new ArmorElectricComponent("pistonev", ItemList.Electric_Piston_EV.get(1, new Object[]{}), 80, StatType.PISTONJUMPBOOST, 6, StatType.PISTONEUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 100f); - new ArmorElectricComponent("pistoniv", ItemList.Electric_Piston_IV.get(1, new Object[]{}),100, StatType.PISTONJUMPBOOST, 7, StatType.PISTONEUUSAGE,1600f, StatType.PROCESSINGPOWERUSED, 200f); - - new ArmorElectricComponent("electrolyzerlv", ItemList.Machine_LV_Electrolyzer.get(1, new Object[]{}), 20, StatType.ELECTROLYZERPROD, 10, StatType.ELECTROLYZEREUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 50f); - new ArmorElectricComponent("electrolyzermv", ItemList.Machine_MV_Electrolyzer.get(1, new Object[]{}), 40, StatType.ELECTROLYZERPROD, 20, StatType.ELECTROLYZEREUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 100f); - new ArmorElectricComponent("electrolyzerhv", ItemList.Machine_HV_Electrolyzer.get(1, new Object[]{}), 60, StatType.ELECTROLYZERPROD, 40, StatType.ELECTROLYZEREUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 150f); - new ArmorElectricComponent("electrolyzerev", ItemList.Machine_EV_Electrolyzer.get(1, new Object[]{}), 80, StatType.ELECTROLYZERPROD, 80, StatType.ELECTROLYZEREUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 200f); - new ArmorElectricComponent("electrolyzeriv", ItemList.Machine_IV_Electrolyzer.get(1, new Object[]{}),100, StatType.ELECTROLYZERPROD,160, StatType.ELECTROLYZEREUUSAGE, 128, StatType.PROCESSINGPOWERUSED, 250f); - - new ArmorElectricComponent("fieldgenlv", ItemList.Field_Generator_LV.get(1, new Object[]{}), 20, StatType.FIELDGENCAP, 1, StatType.FIELDGENEUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 100f); - new ArmorElectricComponent("fieldgenmv", ItemList.Field_Generator_MV.get(1, new Object[]{}), 40, StatType.FIELDGENCAP, 2, StatType.FIELDGENEUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 200f); - new ArmorElectricComponent("fieldgenhv", ItemList.Field_Generator_HV.get(1, new Object[]{}), 60, StatType.FIELDGENCAP, 3, StatType.FIELDGENEUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 300f); - new ArmorElectricComponent("fieldgenev", ItemList.Field_Generator_EV.get(1, new Object[]{}), 80, StatType.FIELDGENCAP, 4, StatType.FIELDGENEUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 400f); - new ArmorElectricComponent("fieldgeniv", ItemList.Field_Generator_IV.get(1, new Object[]{}),100, StatType.FIELDGENCAP, 5, StatType.FIELDGENEUUSAGE, 512, StatType.PROCESSINGPOWERUSED, 500f); - - new ArmorElectricComponent("cell", ItemList.Cell_Empty.get(1, new Object[]{}), 20, StatType.TANKCAP, 8000, null, 1, null, 0); - new ArmorElectricComponent("cellsteel", ItemList.Large_Fluid_Cell_Steel.get(1, new Object[]{}), 40, StatType.TANKCAP, 16000, null, 1, null, 0); - new ArmorElectricComponent("cellts", ItemList.Large_Fluid_Cell_TungstenSteel.get(1, new Object[]{}), 80, StatType.TANKCAP, 64000, null, 1, null, 0); - - new ArmorElectricComponent("circuitbasic", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), 10, StatType.PROCESSINGPOWER, 100, null, 1, null, 1); - new ArmorElectricComponent("circuitgood", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), 20, StatType.PROCESSINGPOWER, 200, null, 1, null, 1); - new ArmorElectricComponent("circuitadv", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1),30, StatType.PROCESSINGPOWER, 300, null, 1, null, 1); - new ArmorElectricComponent("circuitdata", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1), 40, StatType.PROCESSINGPOWER, 400, null, 1, null, 1); - new ArmorElectricComponent("cicuitelite", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1), 50, StatType.PROCESSINGPOWER, 500, null, 1, null, 1); - new ArmorElectricComponent("cicuitmaster", GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 1), 60, StatType.PROCESSINGPOWER, 600, null, 1, null, 1); - -// if (parts[i].getItem().getUnlocalizedName().equals("gte.meta.jetpack")) {// jeptack parts -// switch (parts[i].getItem().getDamage(parts[i])) { -// case 0: -// def[24] += 50; // JetpackFuelPower -// def[25] += 1; // FuelUsage -// def[31] += 10; -// break; -// case 1: -// def[24] += 75; // JetpackFuelPower -// def[25] += 2; // FuelUsage -// def[31] += 20; -// break; -// case 2: -// def[24] += 100; // JetpackFuelPower -// def[25] += 4; // FuelUsage -// def[31] += 30; -// break; -// case 3: -// def[24] += 125; // JetpackFuelPower -// def[25] += 8; // FuelUsage -// def[31] += 40; -// break; -// case 4: -// def[24] += 150; // JetpackFuelPower -// def[25] += 16; // FuelUsage -// def[31] += 50; -// break; -// case 5: -// def[26] += 20; // JetpackEUPower -// def[27] += 8; // JetpackEU -// def[31] += 30; -// break; -// case 6: -// def[26] += 30; // JetpackEUPower -// def[27] += 16; // JetpackEU -// def[31] += 60; -// break; -// case 7: -// def[26] += 40; // JetpackEUPower -// def[27] += 32; // JetpackEU -// def[31] += 90; -// break; -// case 8: -// def[26] += 50; // JetpackEUPower -// def[27] += 64; // JetpackEU -// def[31] += 120; -// break; -// case 9: -// def[26] += 60; // JetpackEUPower -// def[27] += 128; // JetpackEU -// def[31] += 150; -// break; -// case 10: -// def[28] += 100; // AntiGravPower -// def[29] += 32; // AntiGravEU -// def[31] += 100; -// break; -// case 11: -// def[28] += 133; // AntiGravPower -// def[29] += 64; // AntiGravEU -// def[31] += 200; -// break; -// case 12: -// def[28] += 166; // AntiGravPower -// def[29] += 128; // AntiGravEU -// def[31] += 300; -// break; -// case 13: -// def[28] += 200; // AntiGravPower -// def[29] += 256; // AntiGravEU -// def[31] += 400; -// break; -// case 14: -// def[28] += 233; // AntiGravPower -// def[29] += 512; // AntiGravEU -// def[31] += 500; -// break; -// } - - - int tCustomPlatings = GregTech_API.sModularArmor.get("custom", "CustomPlatings", 0); - int tCustomElectronicComponent = GregTech_API.sModularArmor.get("custom", "CustomElectronicComponent", 0); - int tCustomBattery = GregTech_API.sModularArmor.get("custom", "CustomBattery", 0); - int tCustomFunction = GregTech_API.sModularArmor.get("custom", "CustomFunction", 0); - for(int i = 0; i<tCustomPlatings; i++) - new ArmorPlating("customPlate"+i, "platenull_", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 0); - - for(int i = 0; i<tCustomElectronicComponent; i++) - new ArmorElectricComponent("customElectricComponent"+i,new ItemStack(Blocks.stone),0,null,0, null, 0, null, 0); - - for(int i = 0; i<tCustomBattery; i++) - new ArmorComponentBattery("customBattery"+i, new ItemStack(Blocks.stone),true, 0, 0); - - for(int i = 0; i<tCustomFunction; i++) - new ArmorComponentFunction("customFunction"+i, new ItemStack(Blocks.stone), true, 0, null, 0); - } -} diff --git a/src/main/java/gregtech/common/items/armor/components/StatType.java b/src/main/java/gregtech/common/items/armor/components/StatType.java deleted file mode 100644 index aacb997f9b..0000000000 --- a/src/main/java/gregtech/common/items/armor/components/StatType.java +++ /dev/null @@ -1,52 +0,0 @@ -package gregtech.common.items.armor.components; - -public enum StatType { - ELECTRIC, - ELECTRIC2, - - FULLARMOR, - FULLRADIATIONARMOR, - FULLELECTRICARMOR, - - FALLDEFENCE, - PHYSICALDEFENCE, - PROJECTILEDEFENCE, - FIREDEFENCE, - MAGICDEFENCE, - EXPLOSIONDEFENCE, - RADIATIONDEFENCE, - ELECTRICALDEFENCE, - WITHERDEFENCE, - - THORNS, - THORNSSINGLE, - MAGNET, - MAGNETSINGLE, - - THAUMICGOGGLES, - NIGHTVISION, - POTIONINJECTOR, - AUTOFEEDER, - - TANKCAP, - WEIGHT, - PROCESSINGPOWER, - PROCESSINGPOWERUSED, - PARTPROCESSING, - PARTPROCESSINGUSED, - - MOTPRPOWER, - MOTOREUUSAGE, - PISTONJUMPBOOST, - PISTONEUUSAGE, - ELECTROLYZERPROD, - ELECTROLYZEREUUSAGE, - FIELDGENCAP, - FIELDGENEUUSAGE, - JETPACKMAXWEIGHT, - ANTIGRAVMAXWEIGHT, - - PARTSCHARGE, - BATTERYCAPACITY; - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java deleted file mode 100644 index a2ee329099..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.common.items.armor.gui; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerBasicArmor extends ContainerModularArmor { - - public ContainerBasicArmor(EntityPlayer player, InventoryArmor aInvArmor) { - super(player, aInvArmor); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new SlotArmor(mInvArmor, 0, 118, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 1, 136, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 2, 154, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 3, 118, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 4, 136, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 5, 154, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 6, 118, 42)); - addSlotToContainer(new SlotArmor(mInvArmor, 7, 136, 42)); - addSlotToContainer(new SlotArmor(mInvArmor, 8, 154, 42)); - - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) { - ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); - if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ - addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); - }else{ - addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} - } - } - - public int getSlotCount() { - return 9; - } - - public int getShiftClickSlotCount() { - return 9; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java deleted file mode 100644 index 02c8f016bb..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java +++ /dev/null @@ -1,53 +0,0 @@ -package gregtech.common.items.armor.gui; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerElectricArmor1 extends ContainerBasicArmor { - - public ContainerElectricArmor1(EntityPlayer player, InventoryArmor aInvArmor) { - super(player, aInvArmor); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new SlotArmor(mInvArmor, 0, 118, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 1, 136, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 2, 154, 6)); - addSlotToContainer(new SlotArmor(mInvArmor, 3, 118, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 4, 136, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 5, 154, 24)); - addSlotToContainer(new SlotArmor(mInvArmor, 6, 118, 42)); - addSlotToContainer(new SlotArmor(mInvArmor, 7, 136, 42)); - addSlotToContainer(new SlotArmor(mInvArmor, 8, 154, 42)); - addSlotToContainer(new SlotArmor(mInvArmor, 9, 118, 60)); - addSlotToContainer(new SlotArmor(mInvArmor, 10, 136, 60)); - addSlotToContainer(new SlotArmor(mInvArmor, 11, 154, 60)); - - addSlotToContainer(new SlotFluid(mInvArmor,12,94,32)); - - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) { - ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); - if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ - addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); - }else{ - addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} - } - } - - public int getSlotCount() { - return 12; - } - - public int getShiftClickSlotCount() { - return 12; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java deleted file mode 100644 index 1f63afac5e..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ /dev/null @@ -1,167 +0,0 @@ -package gregtech.common.items.armor.gui; - -import gregtech.common.items.armor.ArmorData; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public abstract class ContainerModularArmor extends Container { - - public InventoryArmor mInvArmor; - - public ContainerModularArmor(EntityPlayer player, InventoryArmor aInvArmor) { - this.mInvArmor = aInvArmor; - addSlots(player.inventory); - } - - public ArmorData getData(EntityPlayer aPlayer){ - return null; - } - - @Override - public boolean canInteractWith(EntityPlayer aPlayer) { - return true; - } - - public abstract void addSlots(InventoryPlayer aInventoryPlayer); - - public abstract int getSlotCount(); - - public abstract int getShiftClickSlotCount(); - - public void saveInventory(EntityPlayer entityplayer) { - mInvArmor.onGuiSaved(entityplayer); - } - - @Override - public void onContainerClosed(EntityPlayer player) { - super.onContainerClosed(player); - if (!player.worldObj.isRemote) { - saveInventory(player); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) { - if (player == null) { - return null; - } - - ItemStack originalStack = null; - Slot slot = (Slot) inventorySlots.get(slotIndex); - int numSlots = inventorySlots.size(); - if (slot != null && slot.getHasStack()) { - ItemStack stackInSlot = slot.getStack(); - originalStack = stackInSlot.copy(); - if (slotIndex >= numSlots - 9 * 4 && tryShiftItem(stackInSlot, numSlots)) { - } else if (slotIndex >= numSlots - 9 * 4 && slotIndex < numSlots - 9) { - if (!shiftItemStack(stackInSlot, numSlots - 9, numSlots)) { - return null; - } - } else if (slotIndex >= numSlots - 9 && slotIndex < numSlots) { - if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots - 9)) { - return null; - } - } else if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots)) { - return null; - } - slot.onSlotChange(stackInSlot, originalStack); - if (stackInSlot.stackSize <= 0) { - slot.putStack(null); - } else { - slot.onSlotChanged(); - } - if (stackInSlot.stackSize == originalStack.stackSize) { - return null; - } - slot.onPickupFromSlot(player, stackInSlot); - } - return originalStack; - } - - private boolean tryShiftItem(ItemStack stackToShift, int numSlots) { - for (int machineIndex = 0; machineIndex < numSlots - 9 * 4; machineIndex++) { - Slot slot = (Slot) inventorySlots.get(machineIndex); - if (slot.getHasStack()) { - continue; - } - if(slot instanceof SlotLocked){ - continue; - } - if(slot instanceof SlotFluid){ - continue; - } - - if (!slot.isItemValid(stackToShift)) { - continue; - } - if (shiftItemStack(stackToShift, machineIndex, machineIndex + 1)) { - return true; - } - } - return false; - } - - protected boolean shiftItemStack(ItemStack stackToShift, int start, int end) { - boolean changed = false; - if (stackToShift.isStackable()) { - for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { - Slot slot = (Slot) inventorySlots.get(slotIndex); - ItemStack stackInSlot = slot.getStack(); - if (stackInSlot != null && isIdenticalItem(stackInSlot, stackToShift)) { - int resultingStackSize = stackInSlot.stackSize + stackToShift.stackSize; - int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); - if (resultingStackSize <= max) { - stackToShift.stackSize = 0; - stackInSlot.stackSize = resultingStackSize; - slot.onSlotChanged(); - changed = true; - } else if (stackInSlot.stackSize < max) { - stackToShift.stackSize -= max - stackInSlot.stackSize; - stackInSlot.stackSize = max; - slot.onSlotChanged(); - changed = true; - } - } - } - } - if (stackToShift.stackSize > 0) { - for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { - Slot slot = (Slot) inventorySlots.get(slotIndex); - ItemStack stackInSlot = slot.getStack(); - if (stackInSlot == null) { - int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); - stackInSlot = stackToShift.copy(); - stackInSlot.stackSize = Math.min(stackToShift.stackSize, max); - stackToShift.stackSize -= stackInSlot.stackSize; - slot.putStack(stackInSlot); - slot.onSlotChanged(); - changed = true; - } - } - } - return changed; - } - - public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { - if (lhs == null || rhs == null) { - return false; - } - - if (lhs.getItem() != rhs.getItem()) { - return false; - } - - if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { - if (lhs.getItemDamage() != rhs.getItemDamage()) { - return false; - } - } - - return ItemStack.areItemStackTagsEqual(lhs, rhs); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java deleted file mode 100644 index 0e17a82ee8..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ /dev/null @@ -1,58 +0,0 @@ -package gregtech.common.items.armor.gui; - -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; - -public class FluidSync /**implements IPacket**/ { - String playerName; - int amount; - String fluid; - -// @Override - public byte getPacketID() { - return 0; - } - - public FluidSync(String player, int amount, String fluid) { - this.playerName = player; - this.amount = amount; - this.fluid = fluid.toLowerCase(); - } - -// @Override - public ByteArrayDataOutput encode() { - ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); - rOut.writeUTF(playerName + ";" + amount + ";" + fluid); - return rOut; - } - -// @Override -// public IPacket decode(ByteArrayDataInput aData) { -// String tmp = aData.readUTF(); -// String[] tmp2 = tmp.split(";"); -// return new FluidSync(tmp2[0], Integer.parseInt(tmp2[1]), tmp2[2].toLowerCase()); -// } -// -// @Override -// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { -// WorldServer[] worlds = DimensionManager.getWorlds(); -// EntityPlayer tmp; -// for (int i = 0; i < worlds.length; i++) { -// tmp = worlds[i].getPlayerEntityByName(playerName); -// if (tmp != null) { -// try { -// if (fluid.equals("null")) { -// tmp.openContainer.getSlot(12).putStack(null); -// } else { -// tmp.openContainer.getSlot(12).putStack(UT.Fluids.display(new FluidStack(FluidRegistry.getFluid(fluid), amount), true)); -// } -// tmp.openContainer.detectAndSendChanges(); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// } -// } -// } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java deleted file mode 100644 index 6882e67268..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ /dev/null @@ -1,57 +0,0 @@ -package gregtech.common.items.armor.gui; - -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; - -public class FluidSync2 /**implements IPacket**/ { - String playerName; - -// @Override - public byte getPacketID() { - return 1; - } - - public FluidSync2(String player) { - this.playerName = player; - } - -// @Override - public ByteArrayDataOutput encode() { - ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); - rOut.writeUTF(playerName); - return rOut; - } - -// @Override -// public IPacket decode(ByteArrayDataInput aData) { -// return new FluidSync2(aData.readUTF()); -// } -// -// @Override -// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { -// WorldServer[] worlds = DimensionManager.getWorlds(); -// EntityPlayer tmp; -// for (int i = 0; i < worlds.length; i++) { -// tmp = worlds[i].getPlayerEntityByName(playerName); -// if (tmp != null) { -// try { -// ItemStack tmp2 = tmp.inventory.getItemStack(); -// ItemStack tmp3 = UT.Fluids.getContainerForFilledItem(tmp2, true); -// if (tmp2.stackSize <= 1) { -// tmp2 = null; -// } else { -// tmp2.stackSize--; -// } -// tmp.inventory.setItemStack(tmp2); -// if(tmp3!=null){ -// tmp3.stackSize=1; -// tmp.inventory.addItemStackToInventory(tmp3);} -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// } -// } -// } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java deleted file mode 100644 index b1e08bc708..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java +++ /dev/null @@ -1,330 +0,0 @@ -package gregtech.common.items.armor.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.armor.components.StatType; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - @Override - public void onGuiClosed() - { - cont.saveInventory(player); - super.onGuiClosed(); - }; - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; - } - //Draw active tab - switch(tab){ - case 0: - break; - case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); - break; - case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; - } - float tankCap = cont.mInvArmor.data.mStat.containsKey(StatType.TANKCAP) ? cont.mInvArmor.data.mStat.get(StatType.TANKCAP) :0.0f; - if(tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); - } - float weight = cont.mInvArmor.data.mStat.containsKey(StatType.WEIGHT) ? cont.mInvArmor.data.mStat.get(StatType.WEIGHT) : 0.0f; - int bar = (int) Math.floor(18 * (weight)/(float)1000); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)/(float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER))),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.THORNS)>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.MAGNET)>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); - } - - - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;} - -// if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} -// if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} -// if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} -// if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } - } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null && cont.mInvArmor.data.helmet!=null) { -// ItemStack tmp = player.inventory.getItemStack(); -// //GT_Network gtn = new GT_Network(); -// if (tmp == null) { -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// //ArmorData armorData = new ArmorData(player,); -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// ItemStack tmp4 = GT_Utility.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - - protected void drawTooltip(int x, int y) { - List<String> list = new ArrayList<String>(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) - list.add("Too Heavy!"); - } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); - } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); - } - } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.mStat.get(StatType.TANKCAP)+"L"); - } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER)); - list.add("Processing Power Used: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)); - } - }else if(tab==1){ - - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("Magical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ - list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ - list.add(GT_LanguageManager.getTranslation("Electric Immunity"));} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); - list.add(GT_LanguageManager.getTranslation("Only for Boots")); - }else{ - list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); - list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); - list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m");} - } - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); - } - - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } - } - return null; - } - - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); - } -} diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java deleted file mode 100644 index 9d552f4d2c..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java +++ /dev/null @@ -1,200 +0,0 @@ -package gregtech.common.items.armor.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.armor.components.StatType; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import java.util.ArrayList; -import java.util.List; - -@SideOnly(Side.CLIENT) -public class GuiModularArmor extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - - public GuiModularArmor(ContainerModularArmor containerModularArmor,EntityPlayer aPlayer) { - super(containerModularArmor); - cont = containerModularArmor; - this.player = aPlayer; - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - protected void drawTooltip(int x, int y) { - List<String> list = new ArrayList<String>(); - if (x >= 10 && x <= 17) { - if (y >= 20 && y <= 27) { - list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) - list.add("Too Heavy!"); - } else if (y >= 29 && y <= 36) { - list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 38 && y <= 45) { - list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 47 && y <= 54) { - list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 56 && y <= 63) { - list.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 65 && y <= 72) { - list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 66) { - if (y >= 20 && y <= 27) { - list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); - list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); - } else if (y >= 29 && y <= 36) { - list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); - list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m"); - } else if (y >= 38 && y <= 45) { - list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ - list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} - } else if (y >= 47 && y <= 54) { - list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ - list.add("Electric Immunity");} - } else if (y >= 56 && y <= 63) { - list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 65 && y <= 72) { - if(cont.mInvArmor.data.type!=3){ - list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); - list.add(GT_LanguageManager.getTranslation("Only for Boots")); - }else{ - list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x3.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 124, yStart + 67, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 134, yStart + 67, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 144, yStart + 67, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 154, yStart + 67, 207, 10, 10, 9); - break; - default: - break; - } - - // Weight: 10, 15 =191, 20 - if(getF(StatType.WEIGHT)>0){ - drawTexturedModalRect(xStart + 10, yStart + 15, 191, 20, 7, 7); - } - // Physical Def: 10, 24 =191, 29 - if(getF(StatType.PHYSICALDEFENCE)>0){ - drawTexturedModalRect(xStart + 10, yStart + 24, 191, 29, 7, 7); - } - // Projectile Def: 10, 33 =191, 38 - if(getF(StatType.PROJECTILEDEFENCE)>0){ - drawTexturedModalRect(xStart + 10, yStart + 33, 191, 38, 7, 7); - } - // Fire Def: 10, 42 =191, 47 - if(getF(StatType.FIREDEFENCE)>0){ - drawTexturedModalRect(xStart + 10, yStart + 42, 191, 47, 7, 7); - } - // Magic Def: 10, 51 =191, 56 - if(getF(StatType.MAGICDEFENCE)>0){ - drawTexturedModalRect(xStart + 10, yStart + 51, 191, 56, 7, 7); - } - // Explosive Def: 10, 60 =191, 65 - if(getF(StatType.EXPLOSIONDEFENCE)>0){ - drawTexturedModalRect(xStart + 10, yStart + 60, 191, 65, 7, 7); - } - // Thorns: 59, 15 =198, 20 - if(getF(StatType.THORNS)>0){ - drawTexturedModalRect(xStart + 59, yStart + 15, 198, 20, 7, 7); - } - // Magnet: 59, 24 =198, 29 - if(getF(StatType.MAGNETSINGLE)>0){ - drawTexturedModalRect(xStart + 59, yStart + 24, 198, 29, 7, 7); - } - // Radiation Def: 59, 33 =198, 38 - if(getF(StatType.RADIATIONDEFENCE)>0){ - drawTexturedModalRect(xStart + 59, yStart + 33, 198, 38, 7, 7); - } - // Electric Def: 59, 42 =198, 47 - if(getF(StatType.ELECTRICALDEFENCE)>0){ - drawTexturedModalRect(xStart + 59, yStart + 42, 198, 47, 7, 7); - } - // Wither Def: 59, 51 =198, 56 - if(getF(StatType.WITHERDEFENCE)>0){ - drawTexturedModalRect(xStart + 59, yStart + 51, 198, 56, 7, 7); - } - // Fall Reduction: 59, 60 =198, 65 - if(getF(StatType.FALLDEFENCE)>0){ - drawTexturedModalRect(xStart + 59, yStart + 60, 198, 65, 7, 7); - } - - drawBars(10, 24, getF(StatType.PHYSICALDEFENCE)); - drawBars(10, 33, getF(StatType.PROJECTILEDEFENCE)); - drawBars(10, 42, getF(StatType.FIREDEFENCE)); - drawBars(10, 51, getF(StatType.MAGICDEFENCE)); - drawBars(10, 60, getF(StatType.EXPLOSIONDEFENCE)); - drawBars(59, 33, getF(StatType.RADIATIONDEFENCE)); - drawBars(59, 42, getF(StatType.ELECTRICALDEFENCE)); - drawBars(59, 51, getF(StatType.WITHERDEFENCE)); - } - - public float getF(StatType aType){ - if(cont.mInvArmor.data.mStat.containsKey(aType)) - return cont.mInvArmor.data.mStat.get(aType); - return .0f; - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(35 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - //drawRect(x + xStart, y + yStart, x + bar + xStart, y + 5 + yStart, 0x8000FF00); - //drawRect(x + bar + xStart, y + yStart, x + 36 + xStart, y + 5 + yStart, 0x80FF0000); - drawTexturedModalRect(xStart + x, yStart + y, 177, 78, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 177, 73, 35-bar, 5); - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>67&&yStart<77){ - if(xStart>124&&xStart<163){ - if(xStart>124&&xStart<133&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;} - if(xStart>134&&xStart<143&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;} - if(xStart>144&&xStart<153&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;} - if(xStart>154&&xStart<163&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;} - } - } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java deleted file mode 100644 index 4615f29de5..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java +++ /dev/null @@ -1,233 +0,0 @@ -package gregtech.common.items.armor.gui; - -import gregtech.common.items.armor.ArmorData; -import gregtech.common.items.armor.ModularArmor_Item; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.oredict.OreDictionary; - -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - -public class InventoryArmor implements IInventory { - - public ItemStack[] parts; - public ItemStack parent; -// float[] def = new float[32]; - public int maxCharge; - public int charge; - public ArmorData data; - - public InventoryArmor(Class<ModularArmor_Item> class1, ItemStack currentEquippedItem) { - this.parts = new ItemStack[16]; - this.parent = currentEquippedItem; - setUID(false); - readFromNBT(currentEquippedItem.getTagCompound()); -// for (int i = 0; i < def.length; i++) { -// def[i] = 0.0f; -// } - if(currentEquippedItem.getItem() instanceof ModularArmor_Item){ - data = ((ModularArmor_Item)currentEquippedItem.getItem()).data; - } - - } - - @Override - public int getSizeInventory() { - return this.parts.length; - } - - @Override - public ItemStack getStackInSlot(int i) { - return parts[i]; - } - - @Override - public ItemStack decrStackSize(int i, int j) { - if (parts[i] == null) { - return null; - } - - ItemStack product; - if (parts[i].stackSize <= j) { - product = parts[i]; - parts[i] = null; -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - return product; - } else { - product = parts[i].splitStack(j); - if (parts[i].stackSize == 0) { - parts[i] = null; - } -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - return product; - } - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) { - if (parts[slot] == null) { - return null; - } - ItemStack toReturn = parts[slot]; - parts[slot] = null; - return toReturn; - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - parts[i] = itemstack; -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - } - - @Override - public String getInventoryName() { - return "container.armor"; - } - - @Override - public boolean hasCustomInventoryName() { - return true; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public void markDirty() { - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - return true; - } - - public void onGuiSaved(EntityPlayer entityplayer) { - parent = findParentInInventory(entityplayer); - if (parent != null) { - save(); - } - } - - public void save() { - NBTTagCompound nbt = parent.getTagCompound(); - if (nbt == null) { - nbt = new NBTTagCompound(); - } - writeToNBT(nbt); - ModularArmor_Item tmp = (ModularArmor_Item) parent.getItem(); - tmp.data.calculateArmor(parts); - parent.setTagCompound(nbt); - } - - public void writeToNBT(NBTTagCompound nbt) { - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < parts.length; i++) { - if (parts[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - parts[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - nbt.setTag("Items", nbttaglist); - } - - public ItemStack findParentInInventory(EntityPlayer player) { - for (int i = 0; i < player.inventory.getSizeInventory(); i++) { - ItemStack stack = player.inventory.getStackInSlot(i); - if (isIdenticalItem(stack, parent)) { - return stack; - } - } - return parent; - } - - public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { - if (lhs == null || rhs == null) { - return false; - } - - if (lhs.getItem() != rhs.getItem()) { - return false; - } - - if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { - if (lhs.getItemDamage() != rhs.getItemDamage()) { - return false; - } - } - - return ItemStack.areItemStackTagsEqual(lhs, rhs); - } - - public void readFromNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; - } - if (nbt.hasKey("Items")) { - NBTTagList nbttaglist = nbt.getTagList("Items", 10); - parts = new ItemStack[getSizeInventory()]; - for (int i = 0; i < nbttaglist.tagCount(); i++) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte byte0 = nbttagcompound1.getByte("Slot"); - if (byte0 >= 0 && byte0 < parts.length) { - parts[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - //parts[12]= UT.Fluids.display(UT.Fluids.water(1234), true); - } - } - } - - } - - protected void setUID(boolean override) { - if (parent.getTagCompound() == null) { - parent.setTagCompound(new NBTTagCompound()); - } - NBTTagCompound nbt = parent.getTagCompound(); - if (override || !nbt.hasKey("UID")) { - nbt.setInteger("UID", XSTR_INSTANCE.nextInt()); - } - } - - public static int getOccupiedSlotCount(ItemStack itemStack) { - NBTTagCompound nbt = itemStack.getTagCompound(); - if (nbt == null) { - return 0; - } - - int count = 0; - if (nbt.hasKey("Items")) { - NBTTagList nbttaglist = nbt.getTagList("Items", 10); - for (int i = 0; i < nbttaglist.tagCount(); i++) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - ItemStack itemStack1 = ItemStack.loadItemStackFromNBT(nbttagcompound1); - if (itemStack1 != null && itemStack1.stackSize > 0) { - count++; - } - } - } - return count; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java b/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java deleted file mode 100644 index 8e6d2d41e8..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java +++ /dev/null @@ -1,18 +0,0 @@ -package gregtech.common.items.armor.gui; - -import gregtech.common.items.armor.components.ArmorComponent; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotArmor extends Slot{ - - public SlotArmor(IInventory par1iInventory, int par2, int par3, int par4) { - super(par1iInventory, par2, par3, par4); - } - - @Override - public boolean isItemValid(ItemStack par1ItemStack) { - return ArmorComponent.mStacks.containsKey(par1ItemStack.getUnlocalizedName()); - } -} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java deleted file mode 100644 index 63e8873df9..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ /dev/null @@ -1,26 +0,0 @@ -package gregtech.common.items.armor.gui; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotFluid extends Slot{ - - public SlotFluid(IInventory inventory, int slot_index, int x, int y) { - super(inventory, slot_index, x, y); - } - - @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) - { - return false; - } - - @Override - public boolean isItemValid(ItemStack p_75214_1_) - { - return false; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java b/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java deleted file mode 100644 index 14012d7674..0000000000 --- a/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - - -public class SlotLocked extends Slot{ - - public SlotLocked(IInventory par1iInventory, int par2, int par3, int par4) { - super(par1iInventory, par2, par3, par4); - } - @Override - public void onPickupFromSlot(EntityPlayer player, ItemStack itemStack) { - } - @Override - public boolean isItemValid(ItemStack par1ItemStack) { - return false; - } - @Override - public boolean getHasStack() { - return false; - } - @Override - public ItemStack decrStackSize(int i) { - return null; - } - - @Override - public boolean canTakeStack(EntityPlayer stack) { - return false;} - -} 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 1ebd3c0d16..1ff076dd78 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java @@ -17,8 +17,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -public class Behaviour_Arrow - extends Behaviour_None { +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; @@ -39,6 +38,7 @@ public class Behaviour_Arrow this.mLevel = aLevel; } + @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { if ((aEntity instanceof EntityLivingBase)) { GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase) aEntity, aPlayer, aStack); @@ -54,6 +54,7 @@ public class Behaviour_Arrow return false; } + @Override public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) { if ((this.mEnchantment != null) && (this.mLevel > 0)) { NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); @@ -66,10 +67,12 @@ public class Behaviour_Arrow return true; } + @Override public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { return true; } + @Override public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { World aWorld = aSource.getWorld(); IPosition tPosition = BlockDispenser.func_149939_a(aSource); @@ -88,10 +91,12 @@ public class Behaviour_Arrow return super.onDispense(aItem, aSource, aStack); } + @Override public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) { return aProjectileType == SubTag.PROJECTILE_ARROW; } + @Override 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; @@ -101,6 +106,7 @@ public class Behaviour_Arrow return rArrow; } + @Override 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_Arrow_Potion.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java index 000937b4de..d6f035119d 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 @@ -12,8 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -public class Behaviour_Arrow_Potion - extends Behaviour_Arrow { +public class Behaviour_Arrow_Potion extends Behaviour_Arrow { private final int[] mPotions; public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions) { @@ -26,6 +25,7 @@ public class Behaviour_Arrow_Potion this.mPotions = aPotions; } + @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { if ((aEntity instanceof EntityLivingBase)) { for (int i = 3; i < this.mPotions.length; i += 4) { @@ -37,6 +37,7 @@ public class Behaviour_Arrow_Potion return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity); } + @Override 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; @@ -47,6 +48,7 @@ public class Behaviour_Arrow_Potion return rArrow; } + @Override 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_Crowbar.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java index 1fe66cb723..4b6bd48a9e 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java @@ -10,8 +10,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class Behaviour_Crowbar - extends Behaviour_None { +public class Behaviour_Crowbar extends Behaviour_None { private final int mVanillaCosts; private final int mEUCosts; @@ -20,6 +19,7 @@ public class Behaviour_Crowbar this.mEUCosts = aEUCosts; } + @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) { 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 0943a9b9e2..b909593694 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java @@ -8,8 +8,7 @@ import net.minecraft.nbt.NBTTagList; import java.util.List; -public class Behaviour_DataOrb - extends Behaviour_None { +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) { @@ -93,6 +92,7 @@ public class Behaviour_DataOrb return tNBT; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { if (!(getDataTitle(aStack).length() == 0)) { aList.add(getDataTitle(aStack)); 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 42de464b17..e7792aa94b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -6,8 +6,8 @@ import net.minecraft.item.ItemStack; import java.util.List; -public class Behaviour_DataStick - extends Behaviour_None { +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); if (GT_Utility.isStringValid(tString)) { 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 a03332057d..882f136cfa 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -5,6 +5,7 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,8 +16,7 @@ import net.minecraftforge.event.entity.player.UseHoeEvent; import java.util.List; -public class Behaviour_Hoe - extends Behaviour_None { +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,6 +24,7 @@ public class Behaviour_Hoe this.mCosts = aCosts; } + @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) { if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { return false; @@ -40,7 +41,13 @@ public class Behaviour_Hoe } Block aBlock = aWorld.getBlock(aX, aY, aZ); if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) { - aWorld.playSoundEffect(aX + 0.5F, aY + 0.5F, aZ + 0.5F, Blocks.farmland.stepSound.getStepResourcePath(), (Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.farmland.stepSound.getPitch() * 0.8F); + 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(); if (aWorld.isRemote) { return true; } @@ -53,6 +60,7 @@ public class Behaviour_Hoe return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 e0559ae324..a4a060074b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -17,8 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.List; -public class Behaviour_Lighter - extends Behaviour_None { +public class Behaviour_Lighter extends Behaviour_None { private final ItemStack mEmptyLighter; private final ItemStack mUsedLighter; private final ItemStack mFullLighter; @@ -34,6 +33,7 @@ public class Behaviour_Lighter this.mFuelAmount = aFuelAmount; } + @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { if ((aPlayer.worldObj.isRemote) || (aStack.stackSize != 1)) { return false; @@ -43,7 +43,7 @@ public class Behaviour_Lighter prepare(aStack); long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { - GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), MathHelper.floor_double(aEntity.posZ)); + GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), MathHelper.floor_double(aEntity.posZ)); ((EntityCreeper) aEntity).func_146079_cb(); if (!aPlayer.capabilities.isCreativeMode) { tFuelAmount -= 1L; @@ -58,10 +58,12 @@ public class Behaviour_Lighter return rOutput; } + @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) { 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) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; @@ -78,7 +80,7 @@ public class Behaviour_Lighter prepare(aStack); long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 1.0F, 1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, aZ); aWorld.setBlock(aX, aY, aZ, Blocks.fire); if (!aPlayer.capabilities.isCreativeMode) { tFuelAmount -= 1L; @@ -109,6 +111,7 @@ public class Behaviour_Lighter } } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); NBTTagCompound tNBT = aStack.getTagCompound(); 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 a55cbff4ca..ad037ed13c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -18,39 +18,47 @@ import net.minecraft.world.World; import java.util.List; -public class Behaviour_None - implements IItemBehaviour<GT_MetaBase_Item> { +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) { 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) { return false; } + @Override public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) { return aStack; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { return aList; } + @Override 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) { return true; } + @Override public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { return false; } + @Override public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) { EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); IPosition iposition = BlockDispenser.func_149939_a(aSource); @@ -59,14 +67,17 @@ public class Behaviour_None return aStack; } + @Override public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) { return false; } + @Override 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) { 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 ef364b4cdc..63f922bcec 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 @@ -14,8 +14,7 @@ import thaumcraft.api.aspects.IEssentiaTransport; import java.util.List; -public class Behaviour_Plunger_Essentia - extends Behaviour_None { +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"); @@ -23,6 +22,7 @@ public class Behaviour_Plunger_Essentia 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) { if (aWorld.isRemote) { return false; @@ -30,7 +30,7 @@ public class Behaviour_Plunger_Essentia TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((aTileEntity instanceof IEssentiaTransport)) && ( (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 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); } @@ -39,6 +39,7 @@ public class Behaviour_Plunger_Essentia return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 0ff54e2168..16df231b43 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 @@ -17,8 +17,7 @@ import net.minecraftforge.fluids.IFluidHandler; import java.util.List; -public class Behaviour_Plunger_Fluid - extends Behaviour_None { +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"); @@ -26,6 +25,7 @@ public class Behaviour_Plunger_Fluid 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) { if (aWorld.isRemote) { return false; @@ -36,7 +36,7 @@ public class Behaviour_Plunger_Fluid if (((IFluidHandler) aTileEntity).drain(tDirection, 1000, false) != null) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IFluidHandler) aTileEntity).drain(tDirection, 1000, true); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); return true; } } @@ -50,13 +50,14 @@ public class Behaviour_Plunger_Fluid 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, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); return true; } } return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 5fd46ab2fe..43a95fd2c7 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 @@ -17,8 +17,7 @@ import net.minecraft.world.World; import java.util.List; import java.util.concurrent.ConcurrentHashMap; -public class Behaviour_Plunger_Item - extends Behaviour_None { +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"); @@ -26,6 +25,7 @@ public class Behaviour_Plunger_Item 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) { if (aWorld.isRemote) { return false; @@ -49,7 +49,7 @@ public class Behaviour_Plunger_Item tEntity.motionY = 0.0D; tEntity.motionZ = 0.0D; aWorld.spawnEntityInWorld(tEntity); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -61,6 +61,7 @@ public class Behaviour_Plunger_Item return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 287ebedd33..cdbd5e4424 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java @@ -7,8 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; import java.util.List; -public class Behaviour_PrintedPages - extends Behaviour_None { +public class Behaviour_PrintedPages extends Behaviour_None { public static String getTitle(ItemStack aStack) { NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { @@ -25,6 +24,7 @@ public class Behaviour_PrintedPages return tNBT.getString("author"); } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { if (GT_Utility.isStringValid(getTitle(aStack))) { aList.add(getTitle(aStack)); 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 f232fa8043..e56bd198b7 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -25,8 +25,7 @@ import net.minecraftforge.fluids.IFluidBlock; import java.util.List; import java.util.Random; -public class Behaviour_Prospecting - extends Behaviour_None { +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"); @@ -36,6 +35,7 @@ public class Behaviour_Prospecting this.mEUCosts = aEUCosts; } + @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) { if (aWorld.isRemote) { return false; @@ -50,7 +50,7 @@ public class Behaviour_Prospecting ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))){ GT_Utility.sendChatToPlayer(aPlayer, trans("100","This is ") + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + trans("101"," Ore.")); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(1), 1.0F, -1.0F, aX, aY, aZ); return true; } @@ -64,7 +64,7 @@ public class Behaviour_Prospecting (aBlock == GregTech_API.sBlockOresUb3) || (aBlock == GregTech_API.sBlockOres1)){ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(1), 1.0F, -1.0F, aX, aY, aZ); int tMetaID = 0; int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0; int tX = aX, tY = aY, tZ = aZ; @@ -124,6 +124,7 @@ public class Behaviour_Prospecting return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 02dafe640e..065bdd2189 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java @@ -15,11 +15,11 @@ import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; -public class Behaviour_Scanner - extends Behaviour_None { +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"); + @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) { NBTTagCompound tNBT = aStack.getTagCompound(); if (((aPlayer instanceof EntityPlayerMP)) && (aItem.canUse(aStack, 20000.0D))) { @@ -34,11 +34,12 @@ public class Behaviour_Scanner } return true; } - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 1, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(108), 1, 1.0F, aX, aY, aZ); //doGuiAtClient() return aPlayer instanceof EntityPlayerMP; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { try { NBTTagCompound tNBT = aStack.getTagCompound(); @@ -54,10 +55,4 @@ public class Behaviour_Scanner return aList; } - //public static boolean doGuiAtClient() { - // if (!FMLCommonHandler.instance().getEffectiveSide().isClient() || GT.getThePlayer() == null || !GT.getThePlayer().worldObj.isRemote) - // return false; - // //GUI render start HERE - // return true; - //} } 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 8d36168374..73190c5751 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java @@ -13,8 +13,7 @@ import net.minecraft.item.ItemStack; import java.util.List; -public class Behaviour_Scoop - extends Behaviour_None { +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"); @@ -22,6 +21,7 @@ public class Behaviour_Scoop this.mCosts = aCosts; } + @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { if ((aEntity instanceof IEntityButterfly)) { if (aPlayer.worldObj.isRemote) { @@ -38,6 +38,7 @@ public class Behaviour_Scoop return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 ea548f2106..8662dd7769 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java @@ -10,8 +10,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class Behaviour_Screwdriver - extends Behaviour_None { +public class Behaviour_Screwdriver extends Behaviour_None { private final int mVanillaCosts; private final int mEUCosts; @@ -20,6 +19,7 @@ public class Behaviour_Screwdriver this.mEUCosts = aEUCosts; } + @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) { if (aWorld.isRemote) { return false; @@ -32,14 +32,14 @@ public class Behaviour_Screwdriver if ((aBlock == Blocks.unpowered_repeater) || (aBlock == Blocks.powered_repeater)) { if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.unpowered_comparator) || (aBlock == Blocks.powered_comparator)) { if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } 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 289cc452e8..b75edf426c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java @@ -11,8 +11,7 @@ import net.minecraft.world.World; import java.util.List; -public class Behaviour_Sense - extends Behaviour_None { +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"); @@ -20,6 +19,7 @@ public class Behaviour_Sense 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) { if (aWorld.isRemote) { return false; @@ -40,6 +40,7 @@ public class Behaviour_Sense return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 bcbe985cdb..21d7168827 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java @@ -15,10 +15,10 @@ import net.minecraft.world.World; import java.util.List; -public class Behaviour_SensorKit - extends Behaviour_None { +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"); + @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) { if ((aPlayer instanceof EntityPlayerMP)) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); @@ -26,7 +26,7 @@ public class Behaviour_SensorKit return false; } if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { - GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize, new Object[0])); + GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize)); NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { tNBT = new NBTTagCompound(); @@ -41,6 +41,7 @@ public class Behaviour_SensorKit return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 058cf98b52..43f10995ca 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java @@ -13,8 +13,7 @@ import net.minecraft.world.World; import java.util.List; -public class Behaviour_SoftHammer - extends Behaviour_None { +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"); @@ -22,6 +21,7 @@ public class Behaviour_SoftHammer 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) { if (aWorld.isRemote) { return false; @@ -36,7 +36,7 @@ public class Behaviour_SoftHammer aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, Blocks.redstone_lamp, 0, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -45,7 +45,7 @@ public class Behaviour_SoftHammer aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -54,7 +54,7 @@ public class Behaviour_SoftHammer aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -63,7 +63,7 @@ public class Behaviour_SoftHammer aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -76,27 +76,28 @@ public class Behaviour_SoftHammer 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, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest)) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta - 1) % 4 + 2, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.hopper) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 == 1 ? (aMeta + 1) % 6 : 2, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ); + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 != 1 ? (aMeta + 1) % 6 : 2, 3); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(101), 1.0F, -1.0F, aX, aY, aZ); } return true; } return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 aa4c954ba1..a0dea777f7 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -11,8 +11,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.world.World; -public class Behaviour_Sonictron - extends Behaviour_None { +public class Behaviour_Sonictron extends Behaviour_None { public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Sonictron(); public static int getCurrentIndex(ItemStack aStack) { @@ -91,21 +90,24 @@ public class Behaviour_Sonictron if (aNewContent[i] == null) { aInventory[i] = null; } else { - aInventory[i] = GT_Utility.copy(new Object[]{aNewContent[i]}); + aInventory[i] = GT_Utility.copy(aNewContent[i]); } } } + @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) { setCurrentIndex(aStack, -1); return false; } + @Override public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) { setCurrentIndex(aStack, 0); return aStack; } + @Override 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); 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 748a660c15..5d316f009e 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 @@ -20,8 +20,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -public class Behaviour_Spray_Color - extends Behaviour_None { +public class Behaviour_Spray_Color extends Behaviour_None { private final ItemStack mEmpty; private final ItemStack mUsed; private final ItemStack mFull; @@ -41,6 +40,7 @@ public class Behaviour_Spray_Color this.mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray." + this.mColor + ".tooltip", "Can Color things in " + Dyes.get(this.mColor).mName); } + @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; @@ -110,6 +110,7 @@ public class Behaviour_Spray_Color return aBlock.recolourBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aSide), (this.mColor ^ 0xFFFFFFFF) & 0xF); } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); NBTTagCompound tNBT = aStack.getTagCompound(); 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 f111e9f0fc..5bb89c9dd5 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java @@ -19,8 +19,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.Arrays; import java.util.List; -public class Behaviour_Wrench - extends Behaviour_None { +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"); @@ -28,6 +27,7 @@ public class Behaviour_Wrench 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) { if (aWorld.isRemote) { return false; @@ -44,7 +44,7 @@ public class Behaviour_Wrench if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IWrenchable) aTileEntity).setFacing((short) aTargetSide); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -61,32 +61,32 @@ public class Behaviour_Wrench } } aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } return true; } - } catch (Throwable e) { + } 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))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -94,7 +94,7 @@ public class Behaviour_Wrench if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -103,7 +103,7 @@ public class Behaviour_Wrench if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -111,21 +111,21 @@ public class Behaviour_Wrench if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 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)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return true; } @@ -136,11 +136,12 @@ public class Behaviour_Wrench if (!aPlayer.capabilities.isCreativeMode) { ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); } - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(100), 1.0F, -1.0F, aX, aY, aZ); } return false; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); return aList; 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 3d1ee73d43..e9a771a894 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java @@ -13,8 +13,8 @@ import net.minecraft.world.World; import java.util.List; -public class Behaviour_WrittenBook - extends Behaviour_None { +public class Behaviour_WrittenBook extends Behaviour_None { + @Override @SideOnly(Side.CLIENT) public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) && ((aPlayer instanceof EntityPlayerSP))) { @@ -23,6 +23,7 @@ public class Behaviour_WrittenBook return true; } + @Override public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { String tTitle = GT_Utility.ItemNBT.getBookTitle(aStack); if (GT_Utility.isStringValid(tTitle)) { diff --git a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java index 7ba470e412..d666408807 100644 --- a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java +++ b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java @@ -2,10 +2,7 @@ package gregtech.common.misc; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.util.ChatComponentText; import net.minecraft.util.MathHelper; -import org.lwjgl.opengl.GL11; public class GT_ClientPollutionMap { private static final byte RADIUS = 24; diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java index f3272ee341..a4b46b8cee 100644 --- a/src/main/java/gregtech/common/misc/GT_Command.java +++ b/src/main/java/gregtech/common/misc/GT_Command.java @@ -6,7 +6,6 @@ import gregtech.api.objects.GT_ChunkManager; import gregtech.common.GT_Pollution; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.command.WrongUsageException; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChunkCoordinates; diff --git a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java index ee869a2bd0..c65d7f2be4 100644 --- a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java +++ b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java @@ -1,10 +1,9 @@ package gregtech.common.net; import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; -import gregtech.api.net.GT_Packet; +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; @@ -12,7 +11,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -public final class MessageSetFlaskCapacity extends GT_Packet { +public final class MessageSetFlaskCapacity extends GT_Packet_New { private int capacity, dimID, playerID; public MessageSetFlaskCapacity() { @@ -39,16 +38,14 @@ public final class MessageSetFlaskCapacity extends GT_Packet { } @Override - public byte[] encode() { - ByteArrayDataOutput tOut = ByteStreams.newDataOutput(10); - tOut.writeInt(capacity); - tOut.writeInt(dimID); - tOut.writeInt(playerID); - return tOut.toByteArray(); + public void encode(ByteBuf aOut) { + aOut.writeInt(capacity); + aOut.writeInt(dimID); + aOut.writeInt(playerID); } @Override - public GT_Packet decode(ByteArrayDataInput aData) { + public GT_Packet_New decode(ByteArrayDataInput aData) { return new MessageSetFlaskCapacity(aData.readInt(), aData.readInt(), aData.readInt()); } @@ -64,4 +61,4 @@ public final class MessageSetFlaskCapacity extends GT_Packet { } } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java b/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java new file mode 100644 index 0000000000..619f528502 --- /dev/null +++ b/src/main/java/gregtech/common/net/MessageUpdateFluidDisplayItem.java @@ -0,0 +1,61 @@ +package gregtech.common.net; + +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() { + super(true); + } + + public MessageUpdateFluidDisplayItem(int mBlockX, int mBlockY, int mBlockZ, int mDim) { + super(false); + this.mBlockX = mBlockX; + this.mBlockY = mBlockY; + this.mBlockZ = mBlockZ; + this.mDim = mDim; + } + + @Override + public byte getPacketID() { + return 8; + } + + @Override + public void encode(ByteBuf aOut) { + aOut.writeInt(mBlockX); + aOut.writeInt(mBlockY); + aOut.writeInt(mBlockZ); + aOut.writeInt(mDim); + } + + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { + return new MessageUpdateFluidDisplayItem(aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt()); + } + + @Override + public void process(IBlockAccess aWorld) { + WorldServer world = DimensionManager.getWorld(mDim); + if (world != null) { + if (world.blockExists(mBlockX, mBlockY, mBlockZ)) { + TileEntity tileEntity = world.getTileEntity(mBlockX, mBlockY, mBlockZ); + if (tileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity; + if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) { + ((IHasFluidDisplayItem) gtTile.getMetaTileEntity()).updateFluidDisplayItem(); + } + } + } + } + } +} 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 ab99c1b941..ab4f7eda69 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java @@ -3,16 +3,17 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_BasicLogic - extends GT_CircuitryBehavior { +public class GT_Circuit_BasicLogic extends GT_CircuitryBehavior { public GT_Circuit_BasicLogic(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 0) { aCircuitData[0] = 0; @@ -22,6 +23,7 @@ public class GT_Circuit_BasicLogic } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 2) { aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); @@ -42,14 +44,17 @@ public class GT_Circuit_BasicLogic } } + @Override public String getName() { return "Basic Logic"; } + @Override public String getDescription() { return "Regular Logic Gates"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex == 0) { switch (aCircuitData[0]) { @@ -86,10 +91,12 @@ public class GT_Circuit_BasicLogic return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { return ""; } 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 0a38f929d1..2ea61ddf51 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java @@ -3,12 +3,12 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_BitAnd - extends GT_CircuitryBehavior { +public class GT_Circuit_BitAnd extends GT_CircuitryBehavior { public GT_Circuit_BitAnd(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 0; aCircuitData[1] = 0; @@ -16,6 +16,7 @@ public class GT_Circuit_BitAnd aCircuitData[3] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 0) { aCircuitData[0] = 0; @@ -43,26 +44,32 @@ public class GT_Circuit_BitAnd } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aRedstoneCircuitBlock.setRedstone((byte) ((getStrongestRedstone(aRedstoneCircuitBlock) & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); } + @Override public String getName() { return "Hardcode Bit-AND"; } + @Override public String getDescription() { return "( signal & this ) != 0"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { return "Bit " + aCircuitDataIndex + ":"; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { return aCircuitData[aCircuitDataIndex] == 0 ? "OFF" : "ON"; } 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 1846582bf3..827e4a341e 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_CombinationLock.java @@ -3,12 +3,12 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_CombinationLock - extends GT_CircuitryBehavior { +public class GT_Circuit_CombinationLock extends GT_CircuitryBehavior { public GT_Circuit_CombinationLock(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 1; aCircuitData[1] = 0; @@ -18,6 +18,7 @@ public class GT_Circuit_CombinationLock aCircuitData[5] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 1) { aCircuitData[0] = 1; @@ -54,6 +55,7 @@ public class GT_Circuit_CombinationLock } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { while ((aCircuitData[aCircuitData[4]] == 0) && (aCircuitData[4] < 4)) { aCircuitData[4] += 1; @@ -79,22 +81,27 @@ public class GT_Circuit_CombinationLock } } + @Override public String getName() { return "Combination Lock"; } + @Override public String getDescription() { return "Checks Combinations"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { return "Power " + aCircuitDataIndex; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { return null; } 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 f328b6adde..f5bd99e09e 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java @@ -3,17 +3,18 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_Equals - extends GT_CircuitryBehavior { +public class GT_Circuit_Equals extends GT_CircuitryBehavior { public GT_Circuit_Equals(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 0; aCircuitData[1] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 0) { aCircuitData[0] = 0; @@ -29,18 +30,22 @@ public class GT_Circuit_Equals } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - aRedstoneCircuitBlock.setRedstone(((byte) ((aCircuitData[1] != 0 ? getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0] : getStrongestRedstone(aRedstoneCircuitBlock) != aCircuitData[0]) ? 0 : 15)), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone(((byte) (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) ? 0 : 15)), aRedstoneCircuitBlock.getOutputFacing()); } + @Override public String getName() { return "Equals"; } + @Override public String getDescription() { return "signal == this"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { switch (aCircuitDataIndex) { case 0: @@ -51,10 +56,12 @@ public class GT_Circuit_Equals return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex > 0) { return ""; 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 815a7791cf..d1360df7cb 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -9,12 +9,14 @@ public class GT_Circuit_Pulser super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 1; aCircuitData[1] = 16; aCircuitData[4] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 1) { aCircuitData[0] = 1; @@ -30,6 +32,7 @@ public class GT_Circuit_Pulser } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock); if (aCircuitData[4] == 0) { @@ -47,14 +50,17 @@ public class GT_Circuit_Pulser aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), aRedstoneCircuitBlock.getOutputFacing()); } + @Override public String getName() { return "Pulser"; } + @Override public String getDescription() { return "Limits&Enlengths"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { switch (aCircuitDataIndex) { case 0: @@ -65,10 +71,12 @@ public class GT_Circuit_Pulser return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex == 1) { if (aCircuitData[aCircuitDataIndex] == 16) { 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 b86981e5f9..a04e2e94d1 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java @@ -3,17 +3,18 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_Randomizer - extends GT_CircuitryBehavior { +public class GT_Circuit_Randomizer extends GT_CircuitryBehavior { public GT_Circuit_Randomizer(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 1; aCircuitData[4] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 1) { aCircuitData[0] = 1; @@ -29,6 +30,7 @@ public class GT_Circuit_Randomizer } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[3] == 1) { if (getAnyRedstone(aRedstoneCircuitBlock)) { @@ -47,14 +49,17 @@ public class GT_Circuit_Randomizer } } + @Override public String getName() { return "Randomizer"; } + @Override public String getDescription() { return "Randomizes Redstone"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { switch (aCircuitDataIndex) { case 0: @@ -67,10 +72,12 @@ public class GT_Circuit_Randomizer return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex != 0) { return ""; 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 767b9ac8d0..973e6f3963 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java @@ -3,12 +3,12 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_RedstoneMeter - extends GT_CircuitryBehavior { +public class GT_Circuit_RedstoneMeter extends GT_CircuitryBehavior { public GT_Circuit_RedstoneMeter(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 1; aCircuitData[1] = 15; @@ -16,6 +16,7 @@ public class GT_Circuit_RedstoneMeter aCircuitData[3] = 15; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 0) { aCircuitData[0] = 0; @@ -46,19 +47,23 @@ public class GT_Circuit_RedstoneMeter } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstone = getStrongestRedstone(aRedstoneCircuitBlock); aRedstoneCircuitBlock.setRedstone((byte) (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0), aRedstoneCircuitBlock.getOutputFacing()); } + @Override public String getName() { return "Redstone Meter"; } + @Override public String getDescription() { return "Checks Boundaries"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { switch (aCircuitDataIndex) { case 0: @@ -73,10 +78,12 @@ public class GT_Circuit_RedstoneMeter return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex == 2) { return aCircuitData[2] == 0 ? "OFF" : "ON"; 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 e501bb0258..61432610a9 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Repeater.java @@ -3,18 +3,19 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_Repeater - extends GT_CircuitryBehavior { +public class GT_Circuit_Repeater extends GT_CircuitryBehavior { public GT_Circuit_Repeater(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 1; aCircuitData[4] = 0; aCircuitData[5] = -1; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 1) { aCircuitData[0] = 1; @@ -27,6 +28,7 @@ public class GT_Circuit_Repeater } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (getAnyRedstone(aRedstoneCircuitBlock)) { aCircuitData[4] += 1; @@ -50,26 +52,30 @@ public class GT_Circuit_Repeater } } + @Override public String getName() { return "Repeater"; } + @Override public String getDescription() { return "Delays RS-Signal"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { - switch (aCircuitDataIndex) { - case 0: - return "Delay"; + if (aCircuitDataIndex == 0) { + return "Delay"; } return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex > 0) { return ""; 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 c012ea2afb..57af0c4598 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java @@ -3,12 +3,12 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_Timer - extends GT_CircuitryBehavior { +public class GT_Circuit_Timer extends GT_CircuitryBehavior { public GT_Circuit_Timer(int aIndex) { super(aIndex); } + @Override public void initParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aCircuitData[0] = 2; aCircuitData[1] = 1; @@ -16,6 +16,7 @@ public class GT_Circuit_Timer aCircuitData[4] = 0; } + @Override public void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 2) { aCircuitData[0] = 2; @@ -37,6 +38,7 @@ public class GT_Circuit_Timer } } + @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[3] == 1) { if (getAnyRedstone(aRedstoneCircuitBlock)) { @@ -66,14 +68,17 @@ public class GT_Circuit_Timer } } + @Override public String getName() { return "Timer"; } + @Override public String getDescription() { return "Pulses Redstone"; } + @Override public String getDataDescription(int[] aCircuitData, int aCircuitDataIndex) { switch (aCircuitDataIndex) { case 0: @@ -90,10 +95,12 @@ public class GT_Circuit_Timer return ""; } + @Override public boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex) { return false; } + @Override public String getDataDisplay(int[] aCircuitData, int aCircuitDataIndex) { if (aCircuitDataIndex == 3) { return ""; diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java index be95d7fb04..713254046e 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -15,8 +15,7 @@ import org.lwjgl.opengl.GL11; import java.util.Collection; -public class GT_CapeRenderer - extends RenderPlayer { +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"), @@ -41,7 +40,7 @@ public class GT_CapeRenderer if (aPlayer.isInvisible()) { return; } - if (GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) { + if (GT_Utility.getPotion(aPlayer, Potion.invisibility.id)) { return; } try { diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java new file mode 100644 index 0000000000..fdd20026ab --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java @@ -0,0 +1,123 @@ +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; + +class GT_CopiedBlockTexture implements ITexture, IBlockContainer { + private final Block mBlock; + private final byte mSide, mMeta; + + GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean allowAlpha) { + if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture"); + mBlock = aBlock; + mSide = (byte) aSide; + mMeta = (byte) aMeta; + } + + private IIcon getIcon(int aSide) { + if (mSide == 6) return mBlock.getIcon(aSide, mMeta); + return mBlock.getIcon(mSide, mMeta); + } + + @Override + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal()); + aRenderer.field_152631_f = true; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); + new LightingHelper(aRenderer) + .setupLightingXPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff); + aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + } + + @Override + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); + IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal()); + new LightingHelper(aRenderer) + .setupLightingXNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff); + aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f); + IIcon aIcon = getIcon(ForgeDirection.UP.ordinal()); + new LightingHelper(aRenderer) + .setupLightingYPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.UP.ordinal(), 0xffffff); + aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); + IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal()); + new LightingHelper(aRenderer) + .setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); + aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); + IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal()); + new LightingHelper(aRenderer) + .setupLightingZPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff); + aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); + IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal()); + aRenderer.field_152631_f = true; + new LightingHelper(aRenderer) + .setupLightingZNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff); + aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + } + + @Override + public boolean isValidTexture() { + return mBlock != null; + } + + @Override + public Block getBlock() { + return mBlock; + } + + @Override + public byte getMeta() { + return mMeta; + } +} diff --git a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java index 8b1f505314..7ba4d8e037 100644 --- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java @@ -21,15 +21,18 @@ public final class GT_FlaskRenderer implements net.minecraftforge.client.IItemRe MinecraftForgeClient.registerItemRenderer(ItemList.VOLUMETRIC_FLASK.getItem(), this); } + @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type != ItemRenderType.FIRST_PERSON_MAP; } + @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) { return type == ItemRenderType.ENTITY; } + @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GT_VolumetricFlask cell = (GT_VolumetricFlask) item.getItem(); IIcon icon = item.getIconIndex(); @@ -86,4 +89,4 @@ public final class GT_FlaskRenderer implements net.minecraftforge.client.IItemRe GL11.glDisable(3008); GL11.glDisable(3042); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java index b8b7a121f2..6e4aadc938 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java @@ -17,8 +17,7 @@ import org.lwjgl.opengl.GL11; import java.util.Iterator; -public class GT_MetaGenerated_Item_Renderer - implements IItemRenderer { +public class GT_MetaGenerated_Item_Renderer implements IItemRenderer { public GT_MetaGenerated_Item_Renderer() { GT_MetaGenerated_Item tItem; for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) { @@ -26,6 +25,7 @@ public class GT_MetaGenerated_Item_Renderer } } + @Override public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) { if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) { return false; @@ -33,6 +33,7 @@ public class GT_MetaGenerated_Item_Renderer return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY); } + @Override public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { if (GT_Utility.isStackInvalid(aStack)) { return false; @@ -40,6 +41,7 @@ public class GT_MetaGenerated_Item_Renderer return aType == IItemRenderer.ItemRenderType.ENTITY; } + @Override public void renderItem(IItemRenderer.ItemRenderType type, ItemStack aStack, Object... data) { if (GT_Utility.isStackInvalid(aStack)) { return; 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 4f869fa149..a57f97792c 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 @@ -15,8 +15,7 @@ import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; import org.lwjgl.opengl.GL11; -public class GT_MetaGenerated_Tool_Renderer - implements IItemRenderer { +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) { @@ -25,6 +24,7 @@ public class GT_MetaGenerated_Tool_Renderer } } + @Override public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) { if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) { return false; @@ -32,6 +32,7 @@ public class GT_MetaGenerated_Tool_Renderer return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY); } + @Override public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { if (GT_Utility.isStackInvalid(aStack)) { return false; @@ -39,6 +40,7 @@ public class GT_MetaGenerated_Tool_Renderer return aType == IItemRenderer.ItemRenderType.ENTITY; } + @Override public void renderItem(IItemRenderer.ItemRenderType aType, ItemStack aStack, Object... data) { if (GT_Utility.isStackInvalid(aStack)) { return; @@ -143,14 +145,14 @@ public class GT_MetaGenerated_Tool_Renderer } } Long[] tStats = aItem.getElectricStats(aStack); - if ((tStats != null) && (tStats[3].longValue() < 0L)) { + if ((tStats != null) && (tStats[3] < 0L)) { long tCharge = aItem.getRealCharge(aStack); if (tCharge <= 0L) { aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[0]; - } else if (tCharge >= tStats[0].longValue()) { + } 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].longValue() - tCharge) * 7L / tStats[0].longValue())))]; + 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 new file mode 100644 index 0000000000..eadcb39573 --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_MultiTexture.java @@ -0,0 +1,58 @@ +package gregtech.common.render; + +import gregtech.api.interfaces.ITexture; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; + +/** + * <p>Lets Multiple ITextures Render overlay over each other.<</p> + * <p>I should have done this much earlier...</p> + */ +class GT_MultiTexture implements ITexture { + protected final ITexture[] mTextures; + + GT_MultiTexture(ITexture... aTextures) { + mTextures = aTextures; + } + + @Override + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + for (ITexture tTexture : mTextures) + if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ); + } + + @Override + public boolean isValidTexture() { + return true; + } +} diff --git a/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java b/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java new file mode 100644 index 0000000000..899e4d7c5d --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java @@ -0,0 +1,213 @@ +package gregtech.common.render; + +import gregtech.GT_Mod; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.IColorModulationContainer; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; + +import static gregtech.api.util.LightingHelper.MAX_BRIGHTNESS; + +/** + * This {@link ITexture} implementation renders texture with max brightness to glow in the dark. + */ + +class GT_RenderedGlowTexture implements ITexture, IColorModulationContainer { + protected final IIconContainer mIconContainer; + private final short[] mRGBa; + + GT_RenderedGlowTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) { + if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); + mIconContainer = GT_Mod.gregtechproxy.mRenderGlowTextures ? aIcon : BlockIcons.VOID; + mRGBa = aRGBa; + } + + @Override + public short[] getRGBA() { + return mRGBa; + } + + @Override + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + final boolean enableAO = aRenderer.enableAO; + aRenderer.enableAO = false; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + Tessellator.instance.setColorOpaque(255, 255, 255); + aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.enableAO = enableAO; + } + + @Override + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + aRenderer.field_152631_f = true; + final boolean enableAO = aRenderer.enableAO; + aRenderer.enableAO = false; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + Tessellator.instance.setColorOpaque(255, 255, 255); + aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + aRenderer.enableAO = enableAO; + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + final boolean enableAO = aRenderer.enableAO; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); + final Tessellator tessellator = Tessellator.instance; + IIcon aIcon = mIconContainer.getIcon(); + + float minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + float maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + float minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + float maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + double minX = aX + aRenderer.renderMinX; + double maxX = aX + aRenderer.renderMaxX; + double minY = aY + aRenderer.renderMinY; + double minZ = aZ + aRenderer.renderMinZ; + double maxZ = aZ + aRenderer.renderMaxZ; + + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); + + if (mIconContainer.getOverlayIcon() != null) { + minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + minX = aX + (float) aRenderer.renderMinX; + maxX = aX + (float) aRenderer.renderMaxX; + minY = aY + (float) aRenderer.renderMinY; + minZ = aZ + (float) aRenderer.renderMinZ; + maxZ = aZ + (float) aRenderer.renderMaxZ; + + Tessellator.instance.setColorOpaque(255, 255, 255); + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.enableAO = enableAO; + } + + @Override + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + final boolean enableAO = aRenderer.enableAO; + aRenderer.enableAO = false; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f); + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + Tessellator.instance.setColorOpaque(255, 255, 255); + aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.enableAO = enableAO; + } + + @Override + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + final boolean enableAO = aRenderer.enableAO; + aRenderer.enableAO = false; + aRenderer.field_152631_f = true; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + Tessellator.instance.setColorOpaque(255, 255, 255); + aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + aRenderer.enableAO = enableAO; + } + + @Override + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return; + final boolean enableAO = aRenderer.enableAO; + aRenderer.enableAO = false; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); + Tessellator.instance.setBrightness(MAX_BRIGHTNESS); + Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]); + aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.enableAO = enableAO; + } + + @Override + public boolean isValidTexture() { + return mIconContainer != null; + } +} diff --git a/src/main/java/gregtech/common/render/GT_RenderedTexture.java b/src/main/java/gregtech/common/render/GT_RenderedTexture.java new file mode 100644 index 0000000000..9e76634385 --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java @@ -0,0 +1,214 @@ +package gregtech.common.render; + +import gregtech.api.interfaces.IColorModulationContainer; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +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.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; + +class GT_RenderedTexture implements ITexture, IColorModulationContainer { + protected final IIconContainer mIconContainer; + private final short[] mRGBa; + + GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) { + if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); + mIconContainer = aIcon; + mRGBa = aRGBa; + } + + @Override + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + aRenderer.field_152631_f = true; + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingXPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.EAST.ordinal(), mRGBa); + aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.EAST.ordinal(), 0xffffff); + aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + } + + @Override + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingXNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.WEST.ordinal(), mRGBa); + aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.WEST.ordinal(), 0xffffff); + aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.UP.ordinal(), mRGBa); + aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.UP.ordinal(), 0xffffff); + aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); + final Tessellator tessellator = Tessellator.instance; + IIcon aIcon = mIconContainer.getIcon(); + + float minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + float maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + float minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + float maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + double minX = aX + aRenderer.renderMinX; + double maxX = aX + aRenderer.renderMaxX; + double minY = aY + aRenderer.renderMinY; + double minZ = aZ + aRenderer.renderMinZ; + double maxZ = aZ + aRenderer.renderMaxZ; + + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); + + if (aRenderer.enableAO) { + tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft); + tessellator.setBrightness(aRenderer.brightnessTopLeft); + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft); + tessellator.setBrightness(aRenderer.brightnessBottomLeft); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight); + tessellator.setBrightness(aRenderer.brightnessBottomRight); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight); + tessellator.setBrightness(aRenderer.brightnessTopRight); + } else { + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + } + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); + + if (mIconContainer.getOverlayIcon() != null) { + minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D); + maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D); + minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D); + maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D); + + if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) { + minU = 16.0F - aIcon.getMaxU(); + maxU = 16.0F - aIcon.getMinU(); + } + + if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { + minV = aIcon.getMinV(); + maxV = aIcon.getMaxV(); + } + + minX = aX + (float)aRenderer.renderMinX; + maxX = aX + (float)aRenderer.renderMaxX; + minY = aY + (float)aRenderer.renderMinY; + minZ = aZ + (float)aRenderer.renderMinZ; + maxZ = aZ + (float)aRenderer.renderMaxZ; + + lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); + + if (aRenderer.enableAO) { + tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft); + tessellator.setBrightness(aRenderer.brightnessTopLeft); + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft); + tessellator.setBrightness(aRenderer.brightnessBottomLeft); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight); + tessellator.setBrightness(aRenderer.brightnessBottomRight); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight); + tessellator.setBrightness(aRenderer.brightnessTopRight); + } else { + tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV); + tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV); + tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV); + } + tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingZPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa); + aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff); + aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } + + @Override + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); + aRenderer.field_152631_f = true; + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingZNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa); + aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff); + aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + aRenderer.field_152631_f = false; + } + + @Override + public short[] getRGBA() { + return mRGBa; + } + + @Override + public boolean isValidTexture() { + return mIconContainer != null; + } +} 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 5ee32f8dc6..a9eafd7854 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java @@ -2,6 +2,7 @@ package gregtech.common.render; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,14 +13,36 @@ 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.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; -public class GT_Renderer_Block - implements ISimpleBlockRenderingHandler { +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_DOWN; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_EAST; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_NORTH; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_SOUTH; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_UP; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_WEST; +import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_FRESHFOAM; +import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_HARDENEDFOAM; +import static gregtech.api.interfaces.metatileentity.IConnectable.NO_CONNECTION; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.UP; +import static net.minecraftforge.common.util.ForgeDirection.VALID_DIRECTIONS; +import static net.minecraftforge.common.util.ForgeDirection.WEST; + +public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { + public static final float blockMin = 0.0F; + public static final float blockMax = 1.0F; + private static final float coverThickness = blockMax / 8.0F; + private static final float coverInnerMin = blockMin + coverThickness; + private static final float coverInnerMax = blockMax - coverThickness; public static GT_Renderer_Block INSTANCE; public final int mRenderID; @@ -29,559 +52,638 @@ public class GT_Renderer_Block RenderingRegistry.registerBlockHandler(this); } - private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { - if ((aMeta <= 0) || (aMeta >= GregTech_API.METATILEENTITIES.length)) { - return; - } - IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; - if (tMetaTileEntity == null) { - return; - } - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - if ((tMetaTileEntity.getBaseMetaTileEntity() instanceof IPipeRenderedTileEntity)) { - float tThickness = ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity()).getThickNess(); - float sp = (1.0F - tThickness) / 2.0F; - - aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 0, (byte) 9, (byte) -1, false, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 1, (byte) 9, (byte) -1, false, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 2, (byte) 9, (byte) -1, false, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 3, (byte) 9, (byte) -1, false, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 4, (byte) 9, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 5, (byte) 9, (byte) -1, true, false), true); - Tessellator.instance.draw(); - } else { - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 0, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 1, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 2, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 3, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 4, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(tMetaTileEntity.getBaseMetaTileEntity(), (byte) 5, (byte) 4, (byte) -1, true, false), true); - Tessellator.instance.draw(); - } - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { 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())}); + } if ((tTileEntity instanceof ITexturedTileEntity)) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 0), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 1), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 2), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 3), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 4), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 5)}); + 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) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[DOWN.ordinal()], true); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[UP.ordinal()], true); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[NORTH.ordinal()], true); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[SOUTH.ordinal()], true); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[WEST.ordinal()], true); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[EAST.ordinal()], true); return true; } public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { - byte aConnections = aTileEntity.getConnections(); - if ((aConnections & 0xC0) != 0) { + final byte aConnections = aTileEntity.getConnections(); + if ((aConnections & (HAS_FRESHFOAM | HAS_HARDENEDFOAM)) != 0) { return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); } - float tThickness = aTileEntity.getThickNess(); - if (tThickness >= 0.99F) { + final float thickness = aTileEntity.getThickNess(); + if (thickness >= 0.99F) { return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); } - float sp = (1.0F - tThickness) / 2.0F; - - byte tConnections = 0; - for (byte i = 0; i < 6; i = (byte) (i + 1)) { - if ((aConnections & 1 << i) != 0) { - tConnections = (byte) (tConnections | 1 << (i + 2) % 6); - } + // Range of block occupied by pipe + final float pipeMin = (blockMax - thickness) / 2.0F; + final float pipeMax = blockMax - pipeMin; + final boolean[] tIsCovered = new boolean[VALID_DIRECTIONS.length]; + for (int i = 0; i < VALID_DIRECTIONS.length; i++) { + tIsCovered[i] = (aTileEntity.getCoverIDAtSide((byte) i) != 0); } - boolean[] tIsCovered = new boolean[6]; - for (byte i = 0; i < 6; i = (byte) (i + 1)) { - tIsCovered[i] = (aTileEntity.getCoverIDAtSide(i) != 0); - } - if ((tIsCovered[0]) && (tIsCovered[1]) && (tIsCovered[2]) && (tIsCovered[3]) && (tIsCovered[4]) && (tIsCovered[5])) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } - ITexture[][] tIcons = new ITexture[6][]; - ITexture[][] tCovers = new ITexture[6][]; - for (byte i = 0; i < 6; i = (byte) (i + 1)) { - tCovers[i] = aTileEntity.getTexture(aBlock, i); - tIcons[i] = aTileEntity.getTextureUncovered(i); + + final ITexture[][] tIcons = new ITexture[VALID_DIRECTIONS.length][]; + final ITexture[][] tCovers = new ITexture[VALID_DIRECTIONS.length][]; + for (int i = 0; i < VALID_DIRECTIONS.length; i++) { + tCovers[i] = aTileEntity.getTexture(aBlock, (byte) i); + tIcons[i] = aTileEntity.getTextureUncovered((byte) i); } - if (tConnections == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - } else if (tConnections == 3) { - aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - } - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - } - } else if (tConnections == 12) { - aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, 1.0F, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - } - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - } - } else if (tConnections == 48) { - aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - } - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - } - } else { - if ((tConnections & 0x1) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + + switch (aConnections) { + case NO_CONNECTION: + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - } else { - aBlock.setBlockBounds(0.0F, sp, sp, sp, sp + tThickness, sp + tThickness); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + break; + case CONNECTED_EAST | CONNECTED_WEST: + // EAST - WEST Pipe Sides + aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - } - } - if ((tConnections & 0x2) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + + // EAST - WEST Pipe Ends + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + break; + case CONNECTED_DOWN | CONNECTED_UP: + // UP - DOWN Pipe Sides + aBlock.setBlockBounds(pipeMin, blockMin, pipeMin, pipeMax, blockMax, pipeMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - } else { - aBlock.setBlockBounds(sp + tThickness, sp, sp, 1.0F, sp + tThickness, sp + tThickness); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + + // UP - DOWN Pipe Ends + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + break; + case CONNECTED_NORTH | CONNECTED_SOUTH: + // NORTH - SOUTH Pipe Sides + aBlock.setBlockBounds(pipeMin, pipeMin, blockMin, pipeMax, pipeMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + + // NORTH - SOUTH Pipe Ends + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + break; + default: + if ((aConnections & CONNECTED_WEST) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, pipeMin, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); } - } - if ((tConnections & 0x4) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - } else { - aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, sp, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + + if ((aConnections & CONNECTED_EAST) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(pipeMax, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); } - } - if ((tConnections & 0x8) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - } else { - aBlock.setBlockBounds(sp, sp + tThickness, sp, sp + tThickness, 1.0F, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + + if ((aConnections & CONNECTED_DOWN) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(pipeMin, blockMin, pipeMin, pipeMax, pipeMin, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); } - } - if ((tConnections & 0x10) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); - } else { - aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, sp); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[2], false); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + + if ((aConnections & CONNECTED_UP) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(pipeMin, pipeMax, pipeMin, pipeMax, blockMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); } - } - if ((tConnections & 0x20) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); - } else { - aBlock.setBlockBounds(sp, sp, sp + tThickness, sp + tThickness, sp + tThickness, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[5], false); - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[3], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + + if ((aConnections & CONNECTED_NORTH) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(pipeMin, pipeMin, blockMin, pipeMax, pipeMax, pipeMin); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); } - } + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[NORTH.ordinal()], false); + + if ((aConnections & CONNECTED_SOUTH) == 0) { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMin, pipeMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + } else { + aBlock.setBlockBounds(pipeMin, pipeMin, pipeMax, pipeMax, pipeMax, blockMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[DOWN.ordinal()], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[UP.ordinal()], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[WEST.ordinal()], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[EAST.ordinal()], false); + } + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tIcons[SOUTH.ordinal()], false); + break; } - if (tIsCovered[0]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + + // Render covers on pipes + if (tIsCovered[DOWN.ordinal()]) { + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, coverInnerMin, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - } - if (tIsCovered[1]) { - aBlock.setBlockBounds(0.0F, 0.875F, 0.0F, 1.0F, 1.0F, 1.0F); + if (!tIsCovered[NORTH.ordinal()]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + } + if (!tIsCovered[SOUTH.ordinal()]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + } + if (!tIsCovered[WEST.ordinal()]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + } + if (!tIsCovered[EAST.ordinal()]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + } + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + if ((aConnections & CONNECTED_DOWN) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMin, blockMin, blockMin, blockMax, blockMin, pipeMin); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMin, blockMin, pipeMax, blockMax, blockMin, blockMax); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMin, blockMin, pipeMin, pipeMin, blockMin, pipeMax); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(pipeMax, blockMin, pipeMin, blockMax, blockMin, pipeMax); + } + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[DOWN.ordinal()], false); + } + + if (tIsCovered[UP.ordinal()]) { + aBlock.setBlockBounds(blockMin, coverInnerMax, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - } - if (tIsCovered[2]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.125F); + if (!tIsCovered[NORTH.ordinal()]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + } + if (!tIsCovered[SOUTH.ordinal()]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + } + if (!tIsCovered[WEST.ordinal()]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + } + if (!tIsCovered[EAST.ordinal()]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + } + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + if ((aConnections & CONNECTED_UP) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMin, blockMax, blockMin, blockMax, blockMax, pipeMin); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMin, blockMax, pipeMax, blockMax, blockMax, blockMax); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMin, blockMax, pipeMin, pipeMin, blockMax, pipeMax); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(pipeMax, blockMax, pipeMin, blockMax, blockMax, pipeMax); + } + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[UP.ordinal()], false); + } + + if (tIsCovered[NORTH.ordinal()]) { + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, coverInnerMin); aRenderer.setRenderBoundsFromBlock(aBlock); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - } - if (tIsCovered[3]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.875F, 1.0F, 1.0F, 1.0F); + if (!tIsCovered[DOWN.ordinal()]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + } + if (!tIsCovered[UP.ordinal()]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + } + if (!tIsCovered[WEST.ordinal()]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + } + if (!tIsCovered[EAST.ordinal()]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + } + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + if ((aConnections & CONNECTED_NORTH) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMin, blockMin, blockMin, blockMax, pipeMin, blockMin); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMin, pipeMax, blockMin, blockMax, blockMax, blockMin); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMin, pipeMin, blockMin, pipeMin, pipeMax, blockMin); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(pipeMax, pipeMin, blockMin, blockMax, pipeMax, blockMin); + } + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[NORTH.ordinal()], false); + } + + if (tIsCovered[SOUTH.ordinal()]) { + aBlock.setBlockBounds(blockMin, blockMin, coverInnerMax, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - if (!tIsCovered[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - if (!tIsCovered[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - } - if (tIsCovered[4]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 0.125F, 1.0F, 1.0F); + if (!tIsCovered[DOWN.ordinal()]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + } + if (!tIsCovered[UP.ordinal()]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + } + if (!tIsCovered[WEST.ordinal()]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + } + if (!tIsCovered[EAST.ordinal()]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + } + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + if ((aConnections & CONNECTED_SOUTH) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMin, blockMin, blockMax, blockMax, pipeMin, blockMax); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMin, pipeMax, blockMax, blockMax, blockMax, blockMax); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMin, pipeMin, blockMax, pipeMin, pipeMax, blockMax); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(pipeMax, pipeMin, blockMax, blockMax, pipeMax, blockMax); + } + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[SOUTH.ordinal()], false); + } + + if (tIsCovered[WEST.ordinal()]) { + aBlock.setBlockBounds(blockMin, blockMin, blockMin, coverInnerMin, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - if (tIsCovered[5]) { - aBlock.setBlockBounds(0.875F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + if (!tIsCovered[DOWN.ordinal()]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + } + if (!tIsCovered[UP.ordinal()]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + } + if (!tIsCovered[NORTH.ordinal()]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + } + if (!tIsCovered[SOUTH.ordinal()]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + } + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + if ((aConnections & CONNECTED_WEST) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMin, blockMin, blockMin, blockMin, pipeMin, blockMax); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMin, pipeMax, blockMin, blockMin, blockMax, blockMax); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMin, pipeMin, blockMin, blockMin, pipeMax, pipeMin); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(blockMin, pipeMin, pipeMax, blockMin, pipeMax, blockMax); + } + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[WEST.ordinal()], false); + } + + if (tIsCovered[EAST.ordinal()]) { + aBlock.setBlockBounds(coverInnerMax, blockMin, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); - if (!tIsCovered[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + if (!tIsCovered[DOWN.ordinal()]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); + } + if (!tIsCovered[UP.ordinal()]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); } - if (!tIsCovered[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + if (!tIsCovered[NORTH.ordinal()]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); } - if (!tIsCovered[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + if (!tIsCovered[SOUTH.ordinal()]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); } - if (!tIsCovered[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); + + if ((aConnections & CONNECTED_EAST) != 0) { + // Split outer face to leave hole for pipe + // Lower panel + aRenderer.setRenderBounds(blockMax, blockMin, blockMin, blockMax, pipeMin, blockMax); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); + // Upper panel + aRenderer.setRenderBounds(blockMax, pipeMax, blockMin, blockMax, blockMax, blockMax); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); + // Middle left panel + aRenderer.setRenderBounds(blockMax, pipeMin, blockMin, blockMax, pipeMax, pipeMin); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); + // Middle right panel + aRenderer.setRenderBounds(blockMax, pipeMin, pipeMax, blockMax, pipeMax, blockMax); } - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[EAST.ordinal()], false); } - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); return true; } + @Override + public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { + aRenderer.enableAO = false; + aRenderer.useInventoryTint = true; + + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + + if (aBlock instanceof GT_Block_Ores_Abstract) { + GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores(); + tTileEntity.mMetaData = ((short) aMeta); + + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + + } 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); + } + + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + aRenderer.useInventoryTint = false; + } + + private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { + if ((aMeta <= 0) || (aMeta >= GregTech_API.METATILEENTITIES.length)) { + return; + } + IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; + if (tMetaTileEntity == null) { + return; + } + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + + final IGregTechTileEntity iGregTechTileEntity = tMetaTileEntity.getBaseMetaTileEntity(); + + if ((iGregTechTileEntity instanceof IPipeRenderedTileEntity)) { + final float tThickness = ((IPipeRenderedTileEntity) iGregTechTileEntity).getThickNess(); + final float pipeMin = (blockMax - tThickness) / 2.0F; + final float pipeMax = blockMax - pipeMin; + + aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + } else { + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API + Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API + renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API + } + } + public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld == null) return; - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); - - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ); - } + 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)); + } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ); } } } 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; - } + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) return; Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ); - } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ); } } } 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; - } + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) return; Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ); - } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ); } } } 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; - } + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) return; Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ); - } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ); } } } 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; - } + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) return; Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ); - } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ); } } } 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; - } + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) return; Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ); - } + if (aIcon == null) return; + for (ITexture iTexture : aIcon) { + if (iTexture != null) { + iTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ); } } } - public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { - if ((aBlock instanceof GT_Block_Machines)) { - if ((aMeta > 0) && (aMeta < GregTech_API.METATILEENTITIES.length) && (GregTech_API.METATILEENTITIES[aMeta] != null) && - (!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) { - renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); - } - } else if ((aBlock instanceof GT_Block_Ores_Abstract)) { - GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores(); - tTileEntity.mMetaData = ((short) aMeta); - - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 0), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 1), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 2), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 3), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 4), true); - Tessellator.instance.draw(); - - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 5), true); - Tessellator.instance.draw(); - } - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - + @Override public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { - TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (aTileEntity == null) { - return false; - } - if (aTileEntity instanceof IGregTechTileEntity && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null) && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity().renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer))) { + aRenderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion; + aRenderer.useInventoryTint = false; + TileEntity tileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tileEntity == null) return false; + if (tileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity metaTileEntity; + if ((metaTileEntity = ((IGregTechTileEntity) tileEntity).getMetaTileEntity()) != null && + metaTileEntity.renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)) { + aRenderer.enableAO = false; + return true; + } + } + if (tileEntity instanceof IPipeRenderedTileEntity && + renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) tileEntity, aRenderer)) { + aRenderer.enableAO = false; return true; } - if ((aTileEntity instanceof IPipeRenderedTileEntity)) { - return renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) aTileEntity, aRenderer); + if (renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer)) { + aRenderer.enableAO = false; + return true; } - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + return false; } + @Override public boolean shouldRender3DInInventory(int aModel) { return true; } + @Override public int getRenderId() { return this.mRenderID; } 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 bbd791ec10..7feb8ce1b8 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 @@ -5,8 +5,7 @@ import net.minecraft.client.renderer.entity.RenderArrow; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -public class GT_Renderer_Entity_Arrow - extends RenderArrow { +public class GT_Renderer_Entity_Arrow extends RenderArrow { private final ResourceLocation mTexture; public GT_Renderer_Entity_Arrow(Class aArrowClass, String aTextureName) { @@ -14,6 +13,7 @@ public class GT_Renderer_Entity_Arrow RenderingRegistry.registerEntityRenderingHandler(aArrowClass, this); } + @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.mTexture; } diff --git a/src/main/java/gregtech/common/render/GT_SidedTexture.java b/src/main/java/gregtech/common/render/GT_SidedTexture.java new file mode 100644 index 0000000000..9bdee73eb0 --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_SidedTexture.java @@ -0,0 +1,75 @@ +package gregtech.common.render; + +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; + +class GT_SidedTexture 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. + */ + private final short[] mRGBa; + + 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) + }; + mRGBa = aRGBa; + } + + @Override + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[5].renderXPos(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[4].renderXNeg(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[1].renderYPos(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[0].renderYNeg(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[3].renderZPos(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + mTextures[2].renderZNeg(aRenderer, aBlock, aX ,aY, aZ); + } + + @Override + public short[] getRGBA() { + return mRGBa; + } + + @Override + public boolean isValidTexture() { + for (ITexture renderedTexture : mTextures) { + if (!renderedTexture.isValidTexture()) return false; + } + return true; + } +} diff --git a/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java b/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java new file mode 100644 index 0000000000..ba0f9d3a91 --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java @@ -0,0 +1,36 @@ +package gregtech.common.render; + +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; + +/** + * 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. + */ +class GT_StdRenderedTexture extends GT_RenderedTexture{ + + GT_StdRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) { + super(aIcon, aRGBa, allowAlpha); + } + + @Override + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { + // TODO: Uncomment this once all addons have migrated to the new Texture API + //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); + LightingHelper lighting = new LightingHelper(aRenderer); + lighting.setupLightingYNeg(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.DOWN.ordinal(), getRGBA()); + aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); + if (mIconContainer.getOverlayIcon() != null) { + lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); + aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); + } + // TODO: Uncomment this once all addons have migrated to the new Texture API + //draw(aRenderer); + } +} diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java new file mode 100644 index 0000000000..22446f99a5 --- /dev/null +++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java @@ -0,0 +1,107 @@ +package gregtech.common.render; + +import gregtech.api.enums.Dyes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.ITextureBuilder; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@SuppressWarnings("unused") +public class GT_TextureBuilder implements ITextureBuilder { + private final List<IIconContainer> iconContainerList; + private final List<ITexture> textureLayers; + private Block fromBlock; + private int fromMeta; + private ForgeDirection fromSide; + private short[] rgba; + private boolean allowAlpha; + private boolean stdOrient; + private boolean glow; + + public GT_TextureBuilder() { + textureLayers = new ArrayList<>(); + iconContainerList = new ArrayList<>(); + rgba = Dyes._NULL.mRGBa; + allowAlpha = true; + stdOrient = false; + glow = false; + } + + @Override + public ITextureBuilder setFromBlock(final Block block, final int meta) { + this.fromBlock = block; + this.fromMeta = meta; + this.fromSide = ForgeDirection.UNKNOWN; + return this; + } + + @Override + public ITextureBuilder setFromSide(final ForgeDirection side) { + this.fromSide = side; + return this; + } + + @Override + public ITextureBuilder addIcon(final IIconContainer... iconContainers) { + this.iconContainerList.addAll(Arrays.asList(iconContainers)); + return this; + } + + @Override + public ITextureBuilder setRGBA(final short[] rgba) { + this.rgba = rgba; + return this; + } + + @Override + public ITextureBuilder addLayer(final ITexture... iTextures) { + this.textureLayers.addAll(Arrays.asList(iTextures)); + return this; + } + + @Override + public ITextureBuilder setAllowAlpha(final boolean allowAlpha) { + this.allowAlpha = allowAlpha; + return this; + } + + @Override + public ITextureBuilder stdOrient() { + this.stdOrient = true; + return this; + } + + @Override + public ITextureBuilder glow() { + glow = true; + return this; + } + + @Override + public ITexture build() { + if (fromBlock != null) return new GT_CopiedBlockTexture(fromBlock, fromSide.ordinal(), fromMeta, rgba, allowAlpha); + if (!textureLayers.isEmpty()) return new GT_MultiTexture(textureLayers.toArray(new ITexture[0])); + switch (iconContainerList.size()) { + case 1: + if (stdOrient) return new GT_StdRenderedTexture(iconContainerList.get(0), rgba, allowAlpha); + if (glow) return new GT_RenderedGlowTexture(iconContainerList.get(0), rgba, allowAlpha); + return new GT_RenderedTexture(iconContainerList.get(0), rgba, allowAlpha); + case 6: + return new GT_SidedTexture( + iconContainerList.get(ForgeDirection.DOWN.ordinal()), + iconContainerList.get(ForgeDirection.UP.ordinal()), + iconContainerList.get(ForgeDirection.NORTH.ordinal()), + iconContainerList.get(ForgeDirection.SOUTH.ordinal()), + iconContainerList.get(ForgeDirection.WEST.ordinal()), + iconContainerList.get(ForgeDirection.EAST.ordinal()), + rgba, allowAlpha); + default: + throw new IllegalStateException("Invalid sideIconContainer count"); + } + } +} 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 6605d4fc35..3830cd3497 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -1,11 +1,10 @@ package gregtech.common.tileentities.automation; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_ChestBuffer; import gregtech.common.gui.GT_GUIContainer_ChestBuffer; @@ -17,17 +16,21 @@ import net.minecraft.item.ItemStack; import java.util.Arrays; import java.util.Comparator; -public class GT_MetaTileEntity_ChestBuffer - extends GT_MetaTileEntity_Buffer { - private static final int[] tickRate = {400, 200, 100, 20, 4, 1, 1, 1,1,1}; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER_GLOW; + +public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { + + private static final int[] tickRate = {400, 200, 100, 20, 4, 1, 1, 1, 1, 1, 1, 1, 1}; + private static final int[] maxStacks = { 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128}; 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", - "Consumes 3EU per moved Item", - getTickRateDesc(aTier)}); + "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) { @@ -46,18 +49,24 @@ public class GT_MetaTileEntity_ChestBuffer 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); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_CHESTBUFFER); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_CHESTBUFFER), + TextureFactory.builder().addIcon(AUTOMATION_CHESTBUFFER_GLOW).glow().build()); } + @Override public boolean isValidSlot(int aIndex) { return aIndex < this.mInventory.length - 1; } + @Override protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (aTimer % tickRate[mTier] > 0) return; @@ -67,12 +76,9 @@ public class GT_MetaTileEntity_ChestBuffer // mSuccess will be negative if the call is caused by the %200 aTimer, always try to push. Otherwise it will be positive. // For the first 6 ticks after a successful move (49->44), push every tick. Then go to every 5 ticks. if ( (mSuccess <= 0 ) || (mSuccess > 43) || ((mSuccess % 5) == 0 )){ - super.moveItems(aBaseMetaTileEntity, aTimer); + super.moveItems(aBaseMetaTileEntity, aTimer, Math.min(MAX, maxStacks[mTier])); } - // mSuccesss is set to 50 on a successful move - //if(mSuccess == 50) { - // fillStacksIntoFirstSlots(); - //} + if(mSuccess < 0) { mSuccess = 0; } @@ -110,17 +116,12 @@ public class GT_MetaTileEntity_ChestBuffer id1 = o1.getItemDamage(); id2 = o2.getItemDamage(); - if ( id1 < id2 ) { - return -1; - } - if ( id1 > id2 ) { - return 1; - } - return 0; + return Integer.compare(id1, id2); } }); } + @Override protected void fillStacksIntoFirstSlots() { sortStacks(); // Merge small stacks together @@ -139,23 +140,31 @@ public class GT_MetaTileEntity_ChestBuffer } } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity); } protected static String getTickRateDesc(int tier){ int tickRate = getTickRate(tier); - String s = ""; + String timeStr = ""; + String numStr = ""; + if (maxStacks[tier] > 1) { + numStr = maxStacks[tier] + " items"; + } else { + numStr = "1 item"; + } if (tickRate < 20) - s = "1/" + 20/tickRate + " "; + timeStr = "1/" + 20/tickRate + " "; else if (tickRate > 20) { - s = (tickRate / 20) + "th "; + timeStr = (tickRate / 20) + "th "; } - return "Moves items every " + s + "second"; + return "Moves " + numStr + " every " + timeStr + "second"; } protected static int getTickRate(int tier) { @@ -163,4 +172,9 @@ public class GT_MetaTileEntity_ChestBuffer return 1; return tickRate[tier]; } + + protected static int getMaxStacks(int tier) { + // Included higher tiers on the off chance they actually work without blowing things up lmao + return tier > 9 ? MAX : Math.min(maxStacks[tier], MAX); + } } 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 a2f17ef6f3..5b23c36d9a 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java @@ -1,11 +1,10 @@ package gregtech.common.tileentities.automation; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Filter; import gregtech.common.gui.GT_GUIContainer_Filter; @@ -13,16 +12,18 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -public class GT_MetaTileEntity_Filter - extends GT_MetaTileEntity_Buffer { +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER_GLOW; + +public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer { public boolean bIgnoreNBT = false; public boolean bInvertFilter = false; public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 19, new String[]{ - "Filters up to 9 different Items", - "Use Screwdriver to regulate output stack size", - "Consumes 1EU per moved Item"}); + "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) { @@ -33,38 +34,48 @@ public class GT_MetaTileEntity_Filter 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); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_FILTER); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_FILTER), + TextureFactory.builder().addIcon(AUTOMATION_FILTER_GLOW).glow().build()); } + @Override public boolean isValidSlot(int aIndex) { return aIndex < 9; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_Filter(aPlayerInventory, aBaseMetaTileEntity); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_Filter(aPlayerInventory, aBaseMetaTileEntity); } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setBoolean("bInvertFilter", this.bInvertFilter); aNBT.setBoolean("bIgnoreNBT", this.bIgnoreNBT); } + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.bInvertFilter = aNBT.getBoolean("bInvertFilter"); this.bIgnoreNBT = aNBT.getBoolean("bIgnoreNBT"); } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { return false; 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 5fa3bc8c82..d3b124b79f 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 @@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_ItemDistributor; import gregtech.common.gui.GT_GUIContainer_ItemDistributor; @@ -15,6 +15,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR_GLOW; + public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer { private byte[] itemsPerSide = new byte[6]; private byte currentSide = 0, currentSideItemCount = 0; @@ -24,7 +27,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer "Distributes Items between different Machine Sides", "Default Items per Machine Side: 0", "Use Screwdriver to increase/decrease Items per Side", - "Consumes 1EU per moved Item"}); + "Does not consume energy to move Item"}); } public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, @@ -40,11 +43,13 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer 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); } + @Override protected void fillStacksIntoFirstSlots() { for (int i = 0; i < this.mInventory.length - 1; i++) { for (int j = i + 1; j < this.mInventory.length - 1; j++) { @@ -57,14 +62,19 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_ItemDistributor(aPlayerInventory, aBaseMetaTileEntity); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR), + TextureFactory.builder().addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW).glow().build()); } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_ItemDistributor(aPlayerInventory, aBaseMetaTileEntity); } @@ -86,7 +96,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] returnTextures = new ITexture[2][17][]; - ITexture baseIcon = getOverlayIcon(), pipeIcon = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT); + 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}; @@ -104,6 +114,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer return getBaseMetaTileEntity().getFrontFacing() != aSide && itemsPerSide[aSide] > 0; } + @Override public boolean isValidSlot(int aIndex) { return aIndex < this.mInventory.length - 1; } @@ -119,9 +130,10 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer currentSideItemCount = aNBT.getByte("mCurrentSideItemCount"); } + @Override protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { fillStacksIntoFirstSlots(); - int movedItems = 0; + int movedItems; TileEntity adjacentTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(currentSide); int inspectedSides = 0; while (itemsPerSide[currentSide] == 0) { @@ -143,7 +155,6 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } if (movedItems > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) { mSuccess = 50; - aBaseMetaTileEntity.decreaseStoredEnergyUnits(Math.abs(movedItems), true); } fillStacksIntoFirstSlots(); } @@ -169,4 +180,4 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer super.setItemNBT(aNBT); aNBT.setByteArray("mItemsPerSide", itemsPerSide); } -}
\ No newline at end of file +} 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 b5a33bfb81..c20df68b32 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -1,11 +1,10 @@ package gregtech.common.tileentities.automation; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Regulator; import gregtech.common.gui.GT_GUIContainer_Regulator; @@ -14,7 +13,10 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.util.Arrays; +import java.util.Collections; + +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR_GLOW; public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer { @@ -23,10 +25,10 @@ public class GT_MetaTileEntity_Regulator 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", - "Consumes 1EU per moved Item"}); + "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) { @@ -37,26 +39,34 @@ public class GT_MetaTileEntity_Regulator 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); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_REGULATOR); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_REGULATOR), + TextureFactory.builder().addIcon(AUTOMATION_REGULATOR_GLOW).glow().build()); } + @Override public boolean isValidSlot(int aIndex) { return aIndex < 9; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_Regulator(aPlayerInventory, aBaseMetaTileEntity); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_Regulator(aPlayerInventory, aBaseMetaTileEntity); } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("mTargetSlot1", this.mTargetSlots[0]); @@ -70,6 +80,7 @@ public class GT_MetaTileEntity_Regulator aNBT.setInteger("mTargetSlot9", this.mTargetSlots[8]); } + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.mTargetSlots[0] = aNBT.getInteger("mTargetSlot1"); @@ -85,23 +96,23 @@ public class GT_MetaTileEntity_Regulator @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - //Regulation per Screwdriver is overridden by GUI regulation. + //Regulation per Screwdriver is overridden by GUI regulation. } + @Override public void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - int i = 0; - for (int tCosts = 0; i < 9; i++) { + 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], Arrays.asList(new ItemStack[]{this.mInventory[(i + 9)]}), false, (byte) this.mInventory[(i + 9)].stackSize, (byte) this.mInventory[(i + 9)].stackSize, (byte) 64, (byte) 1) * 3; + tCosts = GT_Utility.moveOneItemStackIntoSlot(getBaseMetaTileEntity(), getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing()), getBaseMetaTileEntity().getBackFacing(), this.mTargetSlots[i], Collections.singletonList(this.mInventory[(i + 9)]), false, (byte) this.mInventory[(i + 9)].stackSize, (byte) this.mInventory[(i + 9)].stackSize, (byte) 64, (byte) 1) * 3; if (tCosts > 0) { this.mSuccess = 50; - getBaseMetaTileEntity().decreaseStoredEnergyUnits(tCosts, true); break; } } } } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)])); } 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 da35f17518..c7a5139c59 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java @@ -1,22 +1,23 @@ package gregtech.common.tileentities.automation; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.gui.GT_Container_SuperBuffer; import gregtech.common.gui.GT_GUIContainer_SuperBuffer; import net.minecraft.entity.player.InventoryPlayer; -public class GT_MetaTileEntity_SuperBuffer - extends GT_MetaTileEntity_ChestBuffer { +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER_GLOW; + +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", - "Consumes 1EU per moved Item", - getTickRateDesc(aTier)}); + "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) { @@ -27,18 +28,24 @@ public class GT_MetaTileEntity_SuperBuffer 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); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_SUPERBUFFER); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_SUPERBUFFER), + TextureFactory.builder().addIcon(AUTOMATION_SUPERBUFFER_GLOW).glow().build()); } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_SuperBuffer(aPlayerInventory, aBaseMetaTileEntity); } 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 6292a769a2..61f0b5cb29 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java @@ -1,13 +1,12 @@ package gregtech.common.tileentities.automation; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_TypeFilter; @@ -16,8 +15,11 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -public class GT_MetaTileEntity_TypeFilter - extends GT_MetaTileEntity_Buffer { +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER_GLOW; + +public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_Buffer { public boolean bNBTAllowed = false; public boolean bInvertFilter = false; public int mRotationIndex = 0; @@ -25,9 +27,9 @@ public class GT_MetaTileEntity_TypeFilter public GT_MetaTileEntity_TypeFilter(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 11, new String[]{ - "Filters 1 Item Type", - "Use Screwdriver to regulate output stack size", - "Consumes 1 EU per moved Item"}); + "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) { @@ -38,22 +40,29 @@ public class GT_MetaTileEntity_TypeFilter 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); } + @Override public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_TYPEFILTER); + return TextureFactory.of( + TextureFactory.of(AUTOMATION_TYPEFILTER), + TextureFactory.builder().addIcon(AUTOMATION_TYPEFILTER_GLOW).glow().build()); } + @Override public boolean isValidSlot(int aIndex) { return aIndex < 9; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_TypeFilter(aPlayerInventory, aBaseMetaTileEntity); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_TypeFilter(aPlayerInventory, aBaseMetaTileEntity); } @@ -87,21 +96,21 @@ public class GT_MetaTileEntity_TypeFilter } } + @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPreTick(aBaseMetaTileEntity, aTick); - if ((getBaseMetaTileEntity().isServerSide()) && ((aTick % 8L == 0L) || mRotationIndex == -1)) { - if (this.mPrefix.mPrefixedItems.isEmpty()) { - this.mInventory[9] = null; - } else { - this.mInventory[9] = GT_Utility.copyAmount(1L, this.mPrefix.mPrefixedItems.get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); - if (this.mInventory[9].getItemDamage() == 32767) { - this.mInventory[9].setItemDamage(0); - } - this.mInventory[9].setStackDisplayName(this.mPrefix.toString()); - } + if ((!getBaseMetaTileEntity().isServerSide()) || ((aTick % 8L != 0L) && mRotationIndex != -1)) return; + if (this.mPrefix.mPrefixedItems.isEmpty()) { + this.mInventory[9] = null; + return; } + this.mInventory[9] = GT_Utility.copyAmount(1L, this.mPrefix.mPrefixedItems.get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); + if (this.mInventory[9] == null) return; + if (this.mInventory[9].getItemDamage() == W) this.mInventory[9].setItemDamage(0); + this.mInventory[9].setStackDisplayName(this.mPrefix.toString()); } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setString("mPrefix", this.mPrefix.toString()); @@ -109,6 +118,7 @@ public class GT_MetaTileEntity_TypeFilter aNBT.setBoolean("bNBTAllowed", this.bNBTAllowed); } + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.mPrefix = OrePrefixes.getPrefix(aNBT.getString("mPrefix"), this.mPrefix); @@ -116,6 +126,7 @@ public class GT_MetaTileEntity_TypeFilter this.bNBTAllowed = aNBT.getBoolean("bNBTAllowed"); } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { boolean tAllowPrefix = this.mPrefix.contains(aStack); if (this.mPrefix == OrePrefixes.ore) { 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 4facb0e300..7cef8278be 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,16 +2,14 @@ package gregtech.common.tileentities.boilers; import gregtech.GT_Mod; import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.objects.GT_ItemStack; -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 gregtech.api.util.*; +import gregtech.common.GT_Pollution; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -22,13 +20,13 @@ import net.minecraftforge.fluids.IFluidHandler; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -public abstract class GT_MetaTileEntity_Boiler - extends GT_MetaTileEntity_BasicTank { +public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank { public int mTemperature = 20; public int mProcessingEnergy = 0; public int mLossTimer = 0; public FluidStack mSteam = null; public boolean mHadNoWater = false; + private int mExcessWater = 0; public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); @@ -46,58 +44,68 @@ public abstract class GT_MetaTileEntity_Boiler super(aName, aTier, 4, aDescription, aTextures); } + @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]; - //mTextures[(aSide==aFacing?(aActive?4:3):aSide==GT_Utility.getOppositeSide(aFacing)?2:aSide==0?0:aSide==1?1:2)][aColorIndex+1]; if (aSide != aFacing && tmp.length == 2) { tmp = new ITexture[]{tmp[0]}; } return tmp; } + @Override public boolean isElectric() { return false; } + @Override public boolean isPneumatic() { return false; } + @Override public boolean isSteampowered() { return false; } + @Override public boolean isSimpleMachine() { return false; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean isAccessAllowed(EntityPlayer aPlayer) { return true; } + @Override public boolean isValidSlot(int aIndex) { return true; } + @Override public int getProgresstime() { return this.mTemperature; } + @Override public int maxProgresstime() { return 500; } + @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { return true; } if (aPlayer != null) { if (GT_Utility.areStacksEqual(aPlayer.getCurrentEquippedItem(), new ItemStack(Items.water_bucket, 1))) { - fill(Materials.Water.getFluid(1000 * aPlayer.getCurrentEquippedItem().stackSize), true); + fill(Materials.Water.getFluid(1000L * (long) aPlayer.getCurrentEquippedItem().stackSize), true); aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket); } else { aBaseMetaTileEntity.openGUI(aPlayer); @@ -106,186 +114,265 @@ public abstract class GT_MetaTileEntity_Boiler return true; } + @Override public boolean doesFillContainers() { return true; } + @Override public boolean doesEmptyContainers() { return true; } + @Override public boolean canTankBeFilled() { return true; } + @Override public boolean canTankBeEmptied() { return true; } + @Override public boolean displaysItemStack() { return false; } + @Override public boolean displaysStackSize() { return false; } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return GT_ModHandler.isWater(aFluid); } + @Override public FluidStack getDrainableStack() { return this.mSteam; } + @Override public FluidStack setDrainableStack(FluidStack aFluid) { this.mSteam = aFluid; return this.mSteam; } + @Override + public boolean isDrainableStackSeparate() { + return true; + } + + @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { return GregTech_API.getCoverBehavior(aCover.toStack()).isSimpleCover(); } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("mLossTimer", this.mLossTimer); aNBT.setInteger("mTemperature", this.mTemperature); aNBT.setInteger("mProcessingEnergy", this.mProcessingEnergy); - if (this.mSteam != null) { - try { - aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); - } catch (Throwable e) { - } + aNBT.setInteger("mExcessWater", this.mExcessWater); + if (this.mSteam == null) { + return; } + try { + aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); + } catch (Throwable ignored) {} } + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.mLossTimer = aNBT.getInteger("mLossTimer"); this.mTemperature = aNBT.getInteger("mTemperature"); this.mProcessingEnergy = aNBT.getInteger("mProcessingEnergy"); + this.mExcessWater = aNBT.getInteger("mExcessWater"); this.mSteam = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mSteam")); } + /** + * Produce some steam. Assume water is present. + */ + protected void produceSteam(int aAmount) { + mExcessWater -= aAmount; + if (mExcessWater < 0) { + int tWaterToConsume = -mExcessWater / GT_Values.STEAM_PER_WATER; + mFluid.amount -= tWaterToConsume; + mExcessWater += GT_Values.STEAM_PER_WATER * tWaterToConsume; + } + if (GT_ModHandler.isSteam(this.mSteam)) { + this.mSteam.amount += aAmount; + } else { + this.mSteam = GT_ModHandler.getSteam(aAmount); + } + } + + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { - if (this.mTemperature <= 20) { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 40) { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte) (i + 1)) { - if (i != aBaseMetaTileEntity.getFrontFacing()) { - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) { - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) { - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - } - if (aTick % 10L == 0L) { - if (this.mTemperature > 100) { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { - this.mHadNoWater = true; - } else { - if (this.mHadNoWater) { - GT_Log.exp.println("Boiler "+this.mName+" had no Water!"); - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(150L); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += 150; - } else { - this.mSteam = GT_ModHandler.getSteam(150L); - } - } - } else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > 32000)) { - sendSound((byte) 1); - this.mSteam.amount = 24000; - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && - (this.mInventory[2] != null)) { - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal)))) { - this.mProcessingEnergy += 160; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) { - this.mProcessingEnergy += 160; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } - } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")) { - this.mProcessingEnergy += 640; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(2) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } - } else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) { - this.mProcessingEnergy += 120; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(8) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } + pollute(aTick); + + if (isNotAllowedToWork(aBaseMetaTileEntity, aTick)) + return; + + calculateCooldown(); + pushSteamToInventories(aBaseMetaTileEntity); + + if (canNotCreateSteam(aBaseMetaTileEntity, aTick)) { + pollute(aTick); + return; + } + + ventSteamIfTankIsFull(); + updateFuelTimed(aBaseMetaTileEntity, aTick); + calculateHeatUp(aBaseMetaTileEntity, aTick); + } + + private boolean isNotAllowedToWork(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + return (!aBaseMetaTileEntity.isServerSide()) || (aTick <= 20L); + } + + private void pollute(long aTick) { + if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution()); + } + } + + private void calculateHeatUp(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if ((this.mTemperature < getMaxTemperature()) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { + this.mProcessingEnergy -= getEnergyConsumption(); + this.mTemperature += getHeatUpAmount(); + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + + private void updateFuelTimed(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork())) + updateFuel(aBaseMetaTileEntity, aTick); + } + + private void ventSteamIfTankIsFull() { + if ((this.mSteam != null) && (this.mSteam.amount > getCapacity())) { + sendSound((byte) 1); + this.mSteam.amount = getCapacity() * 3 / 4; + } + } + + private boolean canNotCreateSteam(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aTick % 10L != 0L) { + return false; + } + + if (this.mTemperature > 100) { + if ((!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { + this.mHadNoWater = true; + } else { + if (this.mHadNoWater) { + GT_Log.exp.println("Boiler "+this.mName+" had no Water!"); + aBaseMetaTileEntity.doExplosion(2048L); + return true; } + produceSteam(getProductionPerSecond() / 2); } - if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { - this.mProcessingEnergy -= 2; - this.mTemperature += 1; - } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } else { + this.mHadNoWater = false; } + return false; } + 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); + if (tDrained == null) + return; + int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false); + if (tFilledAmount <= 0) + return; + tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true), true); + } + + protected void pushSteamToInventories(IGregTechTileEntity aBaseMetaTileEntity) { + for (int i = 1; (this.mSteam != null) && (i < 6); i++) { + if (i == aBaseMetaTileEntity.getFrontFacing()) + continue; + pushSteamToSide(aBaseMetaTileEntity, i); + } + } + + private void calculateCooldown() { + if (this.mTemperature <= 20) { + this.mTemperature = 20; + this.mLossTimer = 0; + } else if (++this.mLossTimer > getCooldownInterval()) { + // only loss temperature if hot + this.mTemperature -= 1; + this.mLossTimer = 0; + } + } + + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation) - return true; - else - return false; + return GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation; } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if(GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation) - return true; - else - return false; - + return GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation; } + @Override public void doSound(byte aIndex, double aX, double aY, double aZ) { if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(4)), 2, 1.0F, aX, aY, aZ); - for (int l = 0; l < 8; l++) { - getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5D + XSTR_INSTANCE.nextFloat(), aY, aZ - 0.5D + XSTR_INSTANCE.nextFloat(), 0.0D, 0.0D, 0.0D); - } + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(4), 2, 1.0F, aX, aY, aZ); + + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setIdentifier("largesmoke") + .setWorld(getBaseMetaTileEntity().getWorld()) + .setMotion(0D,0D,0D) + .<WorldSpawnedEventBuilder.ParticleEventBuilder>times(8, x -> x + .setPosition( + aX - 0.5D + XSTR_INSTANCE.nextFloat(), + aY, + aZ - 0.5D + XSTR_INSTANCE.nextFloat() + ).run() + ); } } + @Override + public int getTankPressure() { + return 100; + } + + protected boolean isOutputToFront() { + return false; + } + + protected abstract int getPollution(); + + @Override public int getCapacity() { return 16000; } - public int getTankPressure() { - return 100; + protected abstract int getProductionPerSecond(); + + protected abstract int getMaxTemperature(); + + protected abstract int getEnergyConsumption(); + + protected abstract int getCooldownInterval(); + + protected int getHeatUpAmount() { + return 1; } + + protected abstract void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick); } 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 eeb8ec252f..5a89f50476 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -1,16 +1,12 @@ package gregtech.common.tileentities.boilers; -import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.XSTR; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; @@ -19,14 +15,17 @@ import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -public class GT_MetaTileEntity_Boiler_Bronze - extends GT_MetaTileEntity_Boiler { +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; +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", @@ -46,159 +45,144 @@ public class GT_MetaTileEntity_Boiler_Bronze super(aName, aTier, aDescription, aTextures); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[3][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; - rTextures[4][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; + 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; + rTextures[2][i] = texSide; + rTextures[3][i] = texFront; + rTextures[4][i] = texFrontActive; } return rTextures; } + @Override public int maxProgresstime() { return 500; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "BronzeBoiler.png", 16000); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - singleBlockBoilerLogic(aBaseMetaTileEntity,aTick,1,45,25L,20); + super.onPostTick(aBaseMetaTileEntity, aTick); + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L) && this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution()); + } } - protected void singleBlockBoilerLogic(IGregTechTileEntity aBaseMetaTileEntity, long aTick, int aMultiplier, int aTimer, long aTickDivider, int aPollution){ - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { - if (this.mTemperature <= 20) { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > aTimer) { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte) (i + 1)) { - if (i != aBaseMetaTileEntity.getFrontFacing()) { - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) { - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) { - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - } - if (aTick % aTickDivider == 0L) { - if (this.mTemperature > 100) { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { - this.mHadNoWater = true; - } else { - if (this.mHadNoWater) { - GT_Log.exp.println("Boiler "+this.mName+" had no Water!"); - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(150L); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += 150; - } else { - this.mSteam = GT_ModHandler.getSteam(150L); - } - } - } else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > (16000*aMultiplier))) { - sendSound((byte) 1); - this.mSteam.amount = (12000*aMultiplier); - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && - (this.mInventory[2] != null)) { - if ( - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Diamond) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke") - ) { - if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { - this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10); - aBaseMetaTileEntity.decrStackSize(2, 1); - if (XSTR.XSTR_INSTANCE.nextInt(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) ? 3 : GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) ? 8 : 2 ) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal)) ? Materials.DarkAsh : Materials.Ash, 1L)); - } - } - } - else if ( - //If its a block of the following materials - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))|| - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond)) || - - //if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block - ( - Block.getBlockFromItem(this.mInventory[2].getItem()) != null && //check if the block exists - ( - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("tile") && //check if the block is a tile -> block - ( - //If the name of the block contains these names - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("charcoal") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("diamond") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coke") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("railcraft.cube") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") - ) - ) - ) - ){ - //try to add 10% of the burnvalue as Processing energy, no boost for coal coke here - if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { - this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); - aBaseMetaTileEntity.decrStackSize(2, 1); - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dust, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") ) ? Materials.DarkAsh : Materials.Ash, 1L)); - } - //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 + protected int getPollution() { + return 20; + } + + @Override + protected int getProductionPerSecond() { + return 120; + } + + @Override + protected int getMaxTemperature() { + return 500; + } + + @Override + protected int getEnergyConsumption() { + return 1; + } + + @Override + protected int getCooldownInterval() { + return 45; + } + + @Override + protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (this.mInventory[2] == null) return; + if ( + (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || + (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || + (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || + (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Diamond) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke") + ) { + if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { + this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10); + aBaseMetaTileEntity.decrStackSize(2, 1); + if (XSTR.XSTR_INSTANCE.nextInt(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) ? 3 : GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) ? 8 : 2 ) == 0) { + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal)) ? Materials.DarkAsh : Materials.Ash, 1L)); } } - if ((this.mTemperature < (500*aMultiplier)) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { - this.mProcessingEnergy -= aMultiplier; - this.mTemperature += 1; - } - if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(getBaseMetaTileEntity(), aPollution); + } + else if ( + //If its a block of the following materials + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal)) || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite)) || + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))|| + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond)) || + + //if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block + ( + Block.getBlockFromItem(this.mInventory[2].getItem()) != null && //check if the block exists + ( + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("tile") && //check if the block is a tile -> block + ( + //If the name of the block contains these names + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("charcoal") || + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("diamond") || + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coke") || + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("railcraft.cube") || + Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") + ) + ) + ) + ){ + //try to add 10% of the burnvalue as Processing energy, no boost for coal coke here + if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { + this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); + aBaseMetaTileEntity.decrStackSize(2, 1); + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dust, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") ) ? Materials.DarkAsh : Materials.Ash, 1L)); } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + //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)); } + } } 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 d6e3d71b81..c71126b146 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -1,31 +1,41 @@ package gregtech.common.tileentities.boilers; -import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Log; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -public class GT_MetaTileEntity_Boiler_Lava - extends GT_MetaTileEntity_Boiler { +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; + +public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { + + public static final int COOLDOWN_INTERVAL = 20; + public static final int ENERGY_PER_LAVA = 1; + public static final int CONSUMPTION_PER_HEATUP = 3; + public static final int PRODUCTION_PER_SECOND = 600; + public static final int POLLUTION_PER_SECOND = 20; + public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[]{ "A Boiler running off Lava", - "Produces 600L of Steam per second", - "Causes 20 Pollution per second"}); + "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second", + "Causes " + POLLUTION_PER_SECOND + " 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) { @@ -36,109 +46,91 @@ public class GT_MetaTileEntity_Boiler_Lava super(aName, aTier, aDescription, aTextures); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[3][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)}; - rTextures[4][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)}; + 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; + rTextures[2][i] = texSide; + rTextures[3][i] = texFront; + rTextures[4][i] = texFrontActive; } return rTextures; } + @Override public int maxProgresstime() { return 1000; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { - if (this.mTemperature <= 20) { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 20) { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte) (i + 1)) { - if (i != aBaseMetaTileEntity.getFrontFacing()) { - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) { - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) { - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - } - if (aTick % 10L == 0L) { - if (this.mTemperature > 100) { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { - this.mHadNoWater = true; - } else { - if (this.mHadNoWater) { - GT_Log.exp.println("Boiler "+this.mName+" had no Water!"); - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(300L); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += 300; - } else { - this.mSteam = GT_ModHandler.getSteam(300L); - } - } - } else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > 32000)) { - sendSound((byte) 1); - this.mSteam.amount = 24000; - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && - (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(Materials.Lava)))) { - this.mProcessingEnergy += 1000; - aBaseMetaTileEntity.decrStackSize(2, 1); - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); - } - if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 8L == 0L)) { - this.mProcessingEnergy -= 3; - this.mTemperature += 1; - } + @Override + protected int getPollution() { + return POLLUTION_PER_SECOND; + } - if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(getBaseMetaTileEntity(), 20); - } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + @Override + protected int getProductionPerSecond() { + return PRODUCTION_PER_SECOND; + } + + @Override + protected int getMaxTemperature() { + return 1000; + } + + @Override + protected int getEnergyConsumption() { + return CONSUMPTION_PER_HEATUP; + } + + @Override + protected int getCooldownInterval() { + return COOLDOWN_INTERVAL; + } + + @Override + protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(Materials.Lava))) { + this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA; + aBaseMetaTileEntity.decrStackSize(2, 1); + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); } } + @Override public final int fill(FluidStack aFluid, boolean doFill) { if ((GT_ModHandler.isLava(aFluid)) && (this.mProcessingEnergy < 50)) { int tFilledAmount = Math.min(50, aFluid.amount); if (doFill) { - this.mProcessingEnergy += tFilledAmount; + this.mProcessingEnergy += tFilledAmount * ENERGY_PER_LAVA; } return tFilledAmount; } 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 d7fd69edb2..59f84ebd91 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -1,200 +1,317 @@ package gregtech.common.tileentities.boilers; import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.nbt.NBTTagCompound; 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.IFluidHandler; +import static gregtech.api.GregTech_API.sMachineFile; +import static gregtech.api.enums.ConfigCategories.machineconfig; + +public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { + public static final String LPS_FMT = "%s L/s"; + private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( + "gt.blockmachines.boiler.solar.desc.format", + "Steam Power by the Sun%n" + + "Produces %sL of Steam per second%n" + + "Calcifies over time, reducing Steam output to %sL/s%n" + + "Break and replace to descale"); + protected final Config mConfig; + protected int basicTemperatureMod = 5; // Base Celsius gain or loss + private int mRunTimeTicks = 0; -public class GT_MetaTileEntity_Boiler_Solar - extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[0]); + mConfig = createConfig(); } public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); + mConfig = createConfig(); } public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); + mConfig = createConfig(); + } + + protected GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { + super(aName, aTier, aDescription, aTextures); + mConfig = aConfig; + } + + protected Config createConfig() { + return new Config(machineconfig + ".boiler.solar.bronze",1080000,40,120,45); + } + + /** + * for WAILA + * + * @deprecated replaced by {@link #getMaxOutputPerSecond()} + */ + @Deprecated + public int getBasicOutput() { + return (int) (getMaxOutputPerSecond() * 1.25F); + } + + public int getMaxOutputPerSecond() { + return mConfig.getMaxOutputPerSecond(); + } + + /** + * for WAILA + * + * @deprecated replaced by {@link #getProductionPerSecond()} + */ + @SuppressWarnings("unused") + @Deprecated + public int getCalcificationOutput() { + return (int) (getProductionPerSecond() * 1.25F); } @Override public String[] getDescription() { - return new String[]{ - "Steam Power by the Sun", - "Produces 120L of Steam per second", - "Calcifies over time, reducing Steam output to 40L/s", - "Break and replace to decalcify"}; + return String.format(localizedDescFormat, + GT_Utility.formatNumbers(getMaxOutputPerSecond()), + GT_Utility.formatNumbers(getMinOutputPerSecond())) + .split("\\R"); } + public int getMinOutputPerSecond() { + return mConfig.getMinOutputPerSecond(); + } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[4][17][]; - for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)}; - rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[2][(i + 1)] = tmp2; - ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[3][(i + 1)] = tmp3; + 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)}; } return rTextures; } - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1]; + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, getCapacity()); } - public int maxProgresstime() { - return 500; + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", getCapacity()); } - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000); + @Override + 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]; + return mTextures[3][i]; + } + return mTextures[aSide][i]; } - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000); + @Override + public int maxProgresstime() { + return 500; } - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); - } - - private int mRunTime = 0; - @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setInteger("mRunTime", this.mRunTime); + aNBT.setInteger("mRunTime", mRunTimeTicks); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - this.mRunTime = aNBT.getInteger("mRunTime"); + mRunTimeTicks = aNBT.getInteger("mRunTime"); } @Override - public String[] getInfoData() { - return new String[]{ - "Heat Capacity: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTemperature * 100 / maxProgresstime()) + " % " + EnumChatFormatting.RESET - + " Hot time: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.mRunTime*25/20)+EnumChatFormatting.RESET+" s", - "Min output: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.basicMaxOuput*20/25)+EnumChatFormatting.RESET+ " L/s" - + " Max output: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.basicOutput*20/25)+EnumChatFormatting.RESET+" L/s", - "Current Output: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCalcificationOutput()*20/25) +EnumChatFormatting.RESET+" L/s"}; + protected void produceSteam(int aAmount) { + super.produceSteam(aAmount); + // produceSteam is getting called every 10 ticks + if (mRunTimeTicks >= 0 && mRunTimeTicks < (Integer.MAX_VALUE - 10)) mRunTimeTicks += 10; + else mRunTimeTicks = Integer.MAX_VALUE; // Prevent Integer overflow wrap } @Override - public boolean isGivingInformation() { - return true; + protected void pushSteamToInventories(IGregTechTileEntity aBaseMetaTileEntity) { + if (mSteam == null || mSteam.amount == 0) return; + pushSteamToSide(aBaseMetaTileEntity, aBaseMetaTileEntity.getFrontFacing()); } - protected int basicOutput = 150; - protected int basicMaxOuput = 50; - protected int basicTemperatureMod = 5; - protected int basicLossTimerLimit = 45; + @Override + protected int getPollution() { + return 0; + } - // Calcification start time is 43200*25/20=54,000s or 15 hours of game time. - static final int CALCIFICATION_TIME = 43200; - - public int getCalcificationOutput() { // Returns how much output the boiler can do. - if (this.mTemperature < 100 ) { + @Override + public int getProductionPerSecond() { + if (mTemperature < 100) { return 0; } - if (this.mRunTime > CALCIFICATION_TIME) { - // Calcification takes about 2/3 CALCIFICATION_TIME to completely calcify on basic solar. For HP solar, it takes about 2x CALCIFICATION_TIME - return Math.max(this.basicMaxOuput, this.basicOutput - ((this.mRunTime - CALCIFICATION_TIME) / (CALCIFICATION_TIME/150))); // Every 288*25 ticks, or 6 minutes, lose 1 L output. + 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 + */ + return mConfig.getMaxOutputPerSecond() + - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks()) / mConfig.getCalcificationTicks(); } else { - return this.basicOutput; + return mConfig.getMaxOutputPerSecond(); } } - public int getBasicOutput() { - return this.basicOutput; + @Override + protected int getMaxTemperature() { + return 500; } - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { - if (this.mTemperature <= 20) { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > basicLossTimerLimit) { - this.mTemperature -= basicTemperatureMod; - this.mLossTimer = 0; - } - if (this.mSteam != null) { - byte i = aBaseMetaTileEntity.getFrontFacing(); - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) { - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) { - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - if (aTick % 25L == 0L) { // Every 25 ticks since 1L of water = 150L of steam. So for 120L, have to use 25 instead of 20. - if (this.mTemperature > 100) { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { - this.mHadNoWater = true; - } else { - if (this.mHadNoWater) { - GT_Log.exp.println("Boiler "+this.mName+" had no Water!"); - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= (basicOutput/150); - mRunTime += 1; - - int tOutput = getCalcificationOutput(); - - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(tOutput); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += tOutput; - } else { - this.mSteam = GT_ModHandler.getSteam(tOutput); - } - } - } else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > this.getCapacity())) { - sendSound((byte) 1); - this.mSteam.amount = 3*(this.getCapacity()/4); - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { - boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F; - mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8*basicTemperatureMod : basicTemperatureMod; - } - if ((this.mTemperature < maxProgresstime()) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { - this.mProcessingEnergy -= basicTemperatureMod; - this.mTemperature += basicTemperatureMod; + @Override + protected int getEnergyConsumption() { + return basicTemperatureMod; + } + + @Override + protected int getCooldownInterval() { + return mConfig.getCoolDownTicks() / basicTemperatureMod; + } + + @Override + protected int getHeatUpAmount() { + return basicTemperatureMod; + } + + @Override + protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + World world = aBaseMetaTileEntity.getWorld(); + // Heat-up every 12s (240 ticks), has to be multiple of 20 ticks + if ((aTick % 240L != 0L) || (world.isThundering())) { + return; + } + if (!aBaseMetaTileEntity.getSkyAtSide((byte) ForgeDirection.UP.ordinal())) { + return; + } + boolean weatherClear = !world.isRaining() || aBaseMetaTileEntity.getBiome().rainfall == 0.0F; + if (!weatherClear && world.skylightSubtracted >= 4) { + return; + } + if (weatherClear) { + if (world.isDaytime()) { + mProcessingEnergy += 8 * basicTemperatureMod; + } else { + mProcessingEnergy += basicTemperatureMod; } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } else { + mProcessingEnergy += basicTemperatureMod; + } + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @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"); + } + + public int getHeatCapacityPercent() { + return mTemperature * 100 / maxProgresstime(); + } + + public int getHotTimeSeconds() { + return mRunTimeTicks / 20; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_Solar(mName, mTier, mDescriptionArray, mTextures, mConfig); + } + + 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) { + calcificationTicks = get(aCategory,"CalcificationTicks", aDefaultCalcificationTicks, + "Number of run-time ticks before boiler starts calcification.", + "100% calcification and minimal output will be reached at 2 times this."); + minOutputPerSecond = get(aCategory,"MinOutputPerSecond", aDefaultMinOutputPerSecond); + maxOutputPerSecond = get(aCategory,"MaxOutputPerSecond", aDefaultMaxOutputPerSecond); + coolDownTicks = get(aCategory,"CoolDownTicks", aDefaultCoolDownTicks, "Number of ticks it takes to lose 1°C."); + // After which min output is reached. + maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond()) * getCalcificationTicks() / getMaxOutputPerSecond() + getCalcificationTicks(); + } + + 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(); + } + + public int getCalcificationTicks() { + return calcificationTicks; + } + + public int getMinOutputPerSecond() { + return minOutputPerSecond; + } + + public int getMaxOutputPerSecond() { + return maxOutputPerSecond; + } + + public int getCoolDownTicks() { + return coolDownTicks; + } + + public int getMaxRuntimeTicks() { + return maxRuntimeTicks; } } } 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 594d338204..ff77b049c4 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java @@ -1,75 +1,71 @@ package gregtech.common.tileentities.boilers; import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.common.gui.GT_Container_Boiler; +import gregtech.api.render.TextureFactory; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.ConfigCategories.machineconfig; + public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boiler_Solar { public GT_MetaTileEntity_Boiler_Solar_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - basicOutput = 450; - basicMaxOuput = 150; - basicLossTimerLimit = 75; // Cools down slower than normal boiler } public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); - basicOutput = 450; - basicMaxOuput = 150; - basicLossTimerLimit = 75; } public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); - basicOutput = 450; - basicMaxOuput = 150; - basicLossTimerLimit = 75; } + public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { + super(aName, aTier, aDescription, aTextures, aConfig); + } + + @Override + protected Config createConfig() { + return new Config(machineconfig + ".boiler.solar.steel", 1080000, 120, 360, 75); + } + + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[4][17][]; - for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)}; - rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[2][(i + 1)] = tmp2; - ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[3][(i + 1)] = tmp3; + 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)}; } return rTextures; } - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000); - } - + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarHPBoiler.png", 32000); + return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarHPBoiler.png", getCapacity()); } @Override - public String[] getDescription() { - return new String[]{ - "Steam Power by the Sun", - "Produces 360L of Steam per second", - "Calcifies over time, reducing Steam output to 120L/s", - "Break and replace to decalcify"}; - } - public int getCapacity() { return 32000; } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Solar_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_Boiler_Solar_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mConfig); } - } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 5655bb47c5..50f68425d7 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -1,17 +1,23 @@ package gregtech.common.tileentities.boilers; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -public class GT_MetaTileEntity_Boiler_Steel - extends GT_MetaTileEntity_Boiler_Bronze {//TODO CHECK POLLUTION VALUES AND DESCRIPTIONS FOR POLLUTION SPOILERS +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; + +public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bronze { public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) { @@ -29,40 +35,77 @@ public class GT_MetaTileEntity_Boiler_Steel super(aName, aTier, aDescription, aTextures); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[2][(i + 1)] = tmp2; - ITexture[] tmp4 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; - rTextures[3][(i + 1)] = tmp4; - ITexture[] tmp5 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; - rTextures[4][(i + 1)] = tmp5; + 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; + rTextures[2][i] = texSide; + rTextures[3][i] = texFront; + rTextures[4][i] = texFrontActive; } return rTextures; } + @Override public int maxProgresstime() { return 1000; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.singleBlockBoilerLogic(aBaseMetaTileEntity,aTick,2,40,10L,30); + @Override + protected int getPollution() { + return 30; + } + + @Override + public int getCapacity() { + return 32000; + } + + @Override + protected int getProductionPerSecond() { + return 300; + } + + @Override + protected int getMaxTemperature() { + return 1000; + } + + @Override + protected int getEnergyConsumption() { + return 2; + } + + @Override + protected int getCooldownInterval() { + return 40; } } 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 c745bfae20..606af204e9 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 @@ -4,20 +4,20 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; 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_DieselGenerator - extends GT_MetaTileEntity_BasicGenerator { +import static gregtech.api.enums.Textures.BlockIcons.*; + +public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator { public static final int BASE_POLLUTION = 2; @@ -40,18 +40,22 @@ public class GT_MetaTileEntity_DieselGenerator onConfigLoad(); } + @Override public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public GT_Recipe.GT_Recipe_Map getRecipes() { return GT_Recipe.GT_Recipe_Map.sDieselFuels; } + @Override public int getCapacity() { return 16000; } @@ -60,73 +64,107 @@ public class GT_MetaTileEntity_DieselGenerator this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 5)); } + @Override public int getEfficiency() { return this.mEfficiency; } + @Override public int getFuelValue(ItemStack aStack) { if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0; long rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { - rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3L); } - if(rValue> Integer.MAX_VALUE){ + if (rValue > Integer.MAX_VALUE) { throw new ArithmeticException("Integer LOOPBACK!"); } - return (int)rValue; + return (int) rValue; } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if(aTick%100==0 && mFluid!=null && mFluid.amount>this.getCapacity()){ - GT_Log.err.println("Dupe Abuse: "+aBaseMetaTileEntity.getOwnerName()+" Coords: "+aBaseMetaTileEntity.getXCoord()+" "+aBaseMetaTileEntity.getYCoord()+" "+aBaseMetaTileEntity.getZCoord()); + 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()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); } + @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)}; + return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), + TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW).glow().build())}; } @Override public int getPollution() { - return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1)); + return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1)); } } 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 ce03f6b505..02b42e2b2f 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 @@ -2,17 +2,16 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -public class GT_MetaTileEntity_GasTurbine - extends GT_MetaTileEntity_BasicGenerator { +import static gregtech.api.enums.Textures.BlockIcons.*; +public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator { public static final int BASE_POLLUTION = 1; public int mEfficiency; @@ -34,18 +33,22 @@ public class GT_MetaTileEntity_GasTurbine onConfigLoad(); } + @Override public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public GT_Recipe.GT_Recipe_Map getRecipes() { return GT_Recipe.GT_Recipe_Map.sTurbineFuels; } + @Override public int getCapacity() { return 16000; } @@ -55,52 +58,85 @@ public class GT_MetaTileEntity_GasTurbine } + @Override public int getEfficiency() { return this.mEfficiency; } + @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)}; + return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), + TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW).glow().build())}; } @Override public int getPollution() { - return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1)); + return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1)); } } 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 0057e87670..88d49075e5 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.generators; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; 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.objects.GT_RenderedTexture; +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; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; @@ -30,7 +31,20 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach @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==1?(aActive ? new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) : new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)):Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]}; + if (aSide != ForgeDirection.UP.ordinal()) { + 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() + }; } @Override @@ -38,6 +52,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach return null; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @@ -46,13 +61,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { World aWorld = aBaseMetaTileEntity.getWorld(); if (!aWorld.isRemote) { - if(aBaseMetaTileEntity.getStoredEU()>0){ + if (aBaseMetaTileEntity.getStoredEU() > 0) { aBaseMetaTileEntity.setActive(true); - aBaseMetaTileEntity.decreaseStoredEnergyUnits(aBaseMetaTileEntity.getStoredEU()/100+1, false); - }else { + aBaseMetaTileEntity.decreaseStoredEnergyUnits(aBaseMetaTileEntity.getStoredEU() / 100 + 1, false); + } else { aBaseMetaTileEntity.setActive(false); } - + if (aTick % 256 == 0 && (aWorld.isThundering() || (aWorld.isRaining() && XSTR_INSTANCE.nextInt(10) == 0))) { int aRodValue = 0; boolean isRodValid = true; @@ -60,13 +75,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach int aY = aBaseMetaTileEntity.getYCoord(); int aZ = aBaseMetaTileEntity.getZCoord(); - for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight()-1; i++) { + for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) { if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) { aRodValue++; } else { isRodValid = false; if (aBaseMetaTileEntity.getBlock(aX, i, aZ) != Blocks.air) { - aRodValue=0; + aRodValue = 0; break; } } 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 eda960bf2b..aceab00a02 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 @@ -2,21 +2,28 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -public class GT_MetaTileEntity_MagicEnergyConverter - extends GT_MetaTileEntity_BasicGenerator { - +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; + +public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; public GT_MetaTileEntity_MagicEnergyConverter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Put your strange stuff in here", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, "Put your strange stuff in here"); onConfigLoad(); } @@ -30,18 +37,22 @@ public class GT_MetaTileEntity_MagicEnergyConverter onConfigLoad(); } + @Override public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public GT_Recipe.GT_Recipe_Map getRecipes() { return GT_Recipe.GT_Recipe_Map.sMagicFuels; } + @Override public int getCapacity() { return 16000; } @@ -51,52 +62,95 @@ public class GT_MetaTileEntity_MagicEnergyConverter } + @Override public int getEfficiency() { return this.mEfficiency; } + @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + return new ITexture[]{ + super.getSidesActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; } @Override public int getPollution() { return 0; } -}
\ No newline at end of file +} 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 b92307002e..5516b355fd 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 @@ -4,13 +4,16 @@ import com.google.common.base.Enums; import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.TC_Aspects; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; -import gregtech.api.util.*; +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 net.minecraft.block.Block; import net.minecraft.block.BlockDragonEgg; import net.minecraft.enchantment.Enchantment; @@ -27,16 +30,31 @@ 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.*; +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 java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import static gregtech.api.enums.ConfigCategories.machineconfig; import static gregtech.api.enums.GT_Values.MOD_ID_TC; import static gregtech.api.enums.GT_Values.V; -import static net.minecraft.util.EnumChatFormatting.*; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static net.minecraft.util.EnumChatFormatting.GRAY; +import static net.minecraft.util.EnumChatFormatting.GREEN; +import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; +import static net.minecraft.util.EnumChatFormatting.RESET; +import static net.minecraft.util.EnumChatFormatting.UNDERLINE; +import static net.minecraft.util.EnumChatFormatting.YELLOW; interface MagicalEnergyBBListener { void onMagicalEnergyBBUpdate(); @@ -46,17 +64,17 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B 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 List<Aspect> sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<Aspect>(); + private static final List<Aspect> sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<Aspect>(); private static boolean sAllowMultipleEggs = false; private static GT_MetaTileEntity_MagicalEnergyAbsorber sActiveSiphon = null; private static int sEnergyPerEndercrystal = 512; private static int sEnergyFromVis = 20; private static int sEnergyPerEssentia = 320; - private static Map<Aspect, Integer> sAspectsEnergy = new HashMap<>(); + private static final Map<Aspect, Integer> sAspectsEnergy = new HashMap<>(); private static int sDragonEggEnergyPerTick = 2048; private int mEfficiency; private int mMaxVisPerDrain; - private MagicalEnergyBB mMagicalEnergyBB = new MagicalEnergyBB(this, mTier, mTier + 2); + private final MagicalEnergyBB mMagicalEnergyBB = new MagicalEnergyBB(this, mTier, mTier + 2); private long mNextGenerateTickRate = 1; private int mNoGenerationTicks = 0; @@ -185,54 +203,84 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), - Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), - Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + return new ITexture[]{ + super.getSidesActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; } @Override @@ -470,12 +518,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B * Handles Bounding Box ranged operations for Magic sources */ static class MagicalEnergyBB { - private GT_MetaTileEntity_MagicalEnergyAbsorber mAbsorber; - private MagicalEnergyBBListener mListener; - private int mDefaultTier; + private final GT_MetaTileEntity_MagicalEnergyAbsorber mAbsorber; + private final MagicalEnergyBBListener mListener; + private final int mDefaultTier; private int mTier; - private int mMaxTier; - private List<UUID> mLivingCrystalIDs = new ArrayList<>(); + private final int mMaxTier; + private final List<UUID> mLivingCrystalIDs = new ArrayList<>(); private List<Aspect> mAvailableAspects; /** @@ -639,4 +687,4 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } } } -}
\ No newline at end of file +} 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 c075fda8a4..0a99a4af05 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 @@ -2,20 +2,21 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGenerator { private int mEfficiency; public GT_MetaTileEntity_NaquadahReactor(int aID, String aName, String[] aDescription, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, aDescription, new ITexture[0]); + super(aID, aName, aNameRegional, aTier, aDescription); if (aTier > 8 || aTier < 4) { new Exception("Tier without Recipe Map!").printStackTrace(); } @@ -30,17 +31,20 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe onConfigLoad(); } + @Override public boolean isOutputFacing(byte aSide) { return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_NaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_NaquadahReactor(mName, mTier, mDescriptionArray, mTextures); } + @Override public GT_Recipe.GT_Recipe_Map getRecipes() { GT_Recipe.GT_Recipe_Map ret; - switch (this.mTier){ + switch (mTier) { case 4: { ret = GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels; break; @@ -57,11 +61,11 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe ret = GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels; break; } - case 8:{ + case 8: { ret = GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels; break; } - default:{ + default: { ret = null; break; } @@ -70,60 +74,97 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe return ret; } + @Override public int getCapacity() { - return getRecipes() != null ? getRecipes().mMinimalInputFluids>0 ? 8000*(mTier+1) : 0 : 0 ; + return getRecipes() != null ? getRecipes().mMinimalInputFluids > 0 ? 8000 * (mTier + 1) : 0 : 0; } + @Override public int getEfficiency() { return mEfficiency == 0 ? onConfigLoad() : mEfficiency; } - private int getBaseEff(){ - return mTier == 4 ? 80 : 100 + (50*(mTier-5)); + private int getBaseEff() { + return mTier == 4 ? 80 : 100 + (50 * (mTier - 5)); } public int onConfigLoad() { - return this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE)}; + 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 52c7e1112c..4ab048a0f7 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 @@ -2,21 +2,24 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -public class GT_MetaTileEntity_PlasmaGenerator - extends GT_MetaTileEntity_BasicGenerator { +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; + +public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; public GT_MetaTileEntity_PlasmaGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Plasma into energy", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, "Plasma into energy"); onConfigLoad(); } @@ -30,73 +33,106 @@ public class GT_MetaTileEntity_PlasmaGenerator onConfigLoad(); } - public boolean isOutputFacing(byte aSide) { - return aSide == getBaseMetaTileEntity().getFrontFacing(); + @Override + public ITexture[] getFront(byte aColor) { + return new ITexture[]{ + super.getFront(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS), + OVERLAYS_ENERGY_OUT[mTier]}; } - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + @Override + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } - public GT_Recipe.GT_Recipe_Map getRecipes() { - return GT_Recipe.GT_Recipe_Map.sPlasmaFuels; + @Override + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } - public int getCapacity() { - return 16000; + @Override + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10,10 + Math.min(90,this.mTier * 10))); + @Override + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } - - public int getEfficiency() { - return this.mEfficiency; + @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]}; } - public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.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()}; } - public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)}; + @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()}; } - public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)}; + @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()}; } - public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)}; + @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()}; } - public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)}; + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); } - public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sPlasmaFuels; } - public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)}; + @Override + public int getEfficiency() { + return this.mEfficiency; } - public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)}; + @Override + public int getCapacity() { + return 16000; } - public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)}; + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } - public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)}; + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10, 10 + Math.min(90, this.mTier * 10))); } - @Override + @Override public int getPollution() { return 0; } -}
\ No newline at end of file +} 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 b248dc5aae..d7b3f03fde 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,16 +2,17 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import net.minecraftforge.fluids.FluidStack; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; @@ -33,14 +34,17 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener onConfigLoad(); } + @Override public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public GT_Recipe.GT_Recipe_Map getRecipes() { return null; } @@ -55,6 +59,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener return desc; } + @Override public int getCapacity() { return 24000 * this.mTier; } @@ -63,60 +68,92 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier); } + @Override public int getEfficiency() { return this.mEfficiency; } + @Override public int getFuelValue(FluidStack aLiquid) { if (aLiquid == null) return 0; - String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid); - return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0; + return GT_ModHandler.isAnySteam(aLiquid) ? 3 : 0; } + @Override public int consumedFluidPerOperation(FluidStack aLiquid) { return this.mEfficiency; } + @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT), - Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE), - Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)}; + 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 @@ -126,7 +163,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public boolean isFluidInputAllowed(FluidStack aFluid) { - if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) { + if (GT_ModHandler.isSuperHeatedSteam(aFluid)) { aFluid.amount = 0; aFluid = null; return false; 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 27ffc096f0..c62145be13 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 @@ -6,10 +6,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; -public class GT_MetaTileEntity_BasicHull_Bronze - extends GT_MetaTileEntity_BasicHull_NonElectric { +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) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -22,16 +21,18 @@ public class GT_MetaTileEntity_BasicHull_Bronze super(aName, aTier, aDescription, aTextures); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_Bronze(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)) { - rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(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 694a701306..90ec54b1fa 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 @@ -6,10 +6,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; -public class GT_MetaTileEntity_BasicHull_BronzeBricks - extends GT_MetaTileEntity_BasicHull_NonElectric { +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) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -22,18 +21,20 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks 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); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {new GT_RenderedTexture(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 = {new GT_RenderedTexture(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 = {new GT_RenderedTexture(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 f697b75f0f..24c3f589e8 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 @@ -6,11 +6,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; -public class GT_MetaTileEntity_BasicHull_Steel - extends GT_MetaTileEntity_BasicHull_NonElectric { - public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) { +public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -22,18 +20,20 @@ public class GT_MetaTileEntity_BasicHull_Steel super(aName, aTier, aDescription, aTextures); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_Steel(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 = {new GT_RenderedTexture(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 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {new GT_RenderedTexture(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 a86fb19928..57ef19478e 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 @@ -6,10 +6,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; -public class GT_MetaTileEntity_BasicHull_SteelBricks - extends GT_MetaTileEntity_BasicHull_NonElectric { +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) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -22,18 +21,20 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks 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); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {new GT_RenderedTexture(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 = {new GT_RenderedTexture(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 = {new GT_RenderedTexture(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_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java new file mode 100644 index 0000000000..12d839d221 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java @@ -0,0 +1,131 @@ +package gregtech.common.tileentities.machines; + +import appeng.api.AEApi; +import appeng.api.networking.GridFlags; +import appeng.api.networking.energy.IEnergySource; +import appeng.api.networking.security.BaseActionSource; +import appeng.api.networking.security.IActionHost; +import appeng.api.networking.security.MachineSource; +import appeng.api.storage.IMEMonitor; +import appeng.api.storage.data.IAEItemStack; +import appeng.api.util.AECableType; +import appeng.me.GridAccessException; +import appeng.me.helpers.AENetworkProxy; +import appeng.me.helpers.IGridProxyable; +import appeng.util.Platform; +import cpw.mods.fml.common.Optional; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.render.TextureFactory; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH; + +public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatch_OutputBus { + private BaseActionSource requestSource = null; + private AENetworkProxy gridProxy = null; + + public GT_MetaTileEntity_Hatch_OutputBus_ME(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 1, new String[]{ + "Item Output for Multiblocks", "Stores directly into ME"}, 0); + } + + public GT_MetaTileEntity_Hatch_OutputBus_ME(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, 0, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_OutputBus_ME(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)}; + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + getProxy(); + } + + @Override + public boolean storeAll(ItemStack aStack) { + if (!GregTech_API.mAE2) + return false; + int tTotal = aStack.stackSize; + int tStored = store(aStack); + aStack.stackSize -= tStored; + return tTotal == tStored; + } + + @Optional.Method(modid = "appliedenergistics2") + public int store(final ItemStack stack) { + if (stack == null) + return 0; + try { + AENetworkProxy proxy = getProxy(); + if (proxy == null) + return stack.stackSize; + IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory(); + final IEnergySource src = proxy.getEnergy(); + IAEItemStack toStore = AEApi.instance().storage().createItemStack(stack); + IAEItemStack rest = Platform.poweredInsert( src, sg, toStore, getRequest()); + if (rest != null) + return (int)rest.getStackSize(); + return 0; + } + catch( final GridAccessException ignored ) + { + } + return stack.stackSize; + } + + @Optional.Method(modid = "appliedenergistics2") + private BaseActionSource getRequest() { + if (requestSource == null) + requestSource = new MachineSource((IActionHost)getBaseMetaTileEntity()); + return requestSource; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public AECableType getCableConnectionType(ForgeDirection forgeDirection) { + return isOutputFacing((byte)forgeDirection.ordinal()) ? AECableType.SMART : AECableType.NONE; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + return false; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public AENetworkProxy getProxy() { + if (gridProxy == null) { + if (getBaseMetaTileEntity() instanceof IGridProxyable) { + gridProxy = new AENetworkProxy((IGridProxyable)getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); + gridProxy.onReady(); + gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); + } + } + return this.gridProxy; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public void gridChanged() { + } +} 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 28f661c339..10bfd92f37 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,13 +3,12 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; @@ -25,8 +24,12 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.fluids.FluidStack; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; @@ -44,18 +47,35 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba 1, // output slot count "Default.png", // GUI name "", // NEI name - new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) }); + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build())); radius = aRadius; step = aStep; } + @Override public String[] getDescription() { return new String[]{ "Place, activate with explosives", @@ -79,6 +99,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba step = aStep; } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName, this.radius, this.step); @@ -220,7 +241,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba ItemData association = GT_OreDictUnificator.getAssociation(is); if ((association != null) && (association.mPrefix.toString().startsWith("ore"))) return association.mMaterial.mMaterial.mDefaultLocalName; - else if (GT_Utility.isOre(is)) + else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName(); } return null; 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 6895310b46..98ddf665c0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -1,26 +1,49 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; +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 { +import static gregtech.api.enums.Textures.BlockIcons.*; + +public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine { ItemStack aInputCache; ItemStack aOutputCache; int aTypeCache = 0; public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR)}); + super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_BOXINATOR), + 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().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_BOXINATOR), + 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.of( + TextureFactory.of(OVERLAY_TOP_BOXINATOR), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR), + 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) { @@ -31,10 +54,12 @@ public class GT_MetaTileEntity_Boxinator 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); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; } @@ -61,6 +86,7 @@ public class GT_MetaTileEntity_Boxinator aInputCache = mInputItem.copy(); } + @Override public int checkRecipe() { int tCheck = super.checkRecipe(); if (tCheck != DID_NOT_FIND_RECIPE) { @@ -71,9 +97,9 @@ public class GT_MetaTileEntity_Boxinator 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); - this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(new ItemStack[]{tSlot0}); + this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0); if (this.mOutputItems[0] != null) { - if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + if (canOutput(this.mOutputItems[0])) { tSlot0.stackSize -= 1; calculateOverclockedNess(32,16); //In case recipe is too OP for that machine @@ -88,9 +114,9 @@ public class GT_MetaTileEntity_Boxinator } if ((ItemList.Schematic_2by2.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 4)) { boolean tIsCached = hasValidCache(tSlot0,2,true); - this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(new ItemStack[]{tSlot0, tSlot0, null, tSlot0, tSlot0}); + this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { - if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 4; calculateOverclockedNess(32,32); //In case recipe is too OP for that machine @@ -105,9 +131,9 @@ public class GT_MetaTileEntity_Boxinator } if ((ItemList.Schematic_3by3.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 9)) { boolean tIsCached = hasValidCache(tSlot0,3,true); - this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(new ItemStack[]{tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0}); + this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { - if (canOutput(new ItemStack[]{this.mOutputItems[0]})) { + if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 9; calculateOverclockedNess(32,64); //In case recipe is too OP for that machine @@ -124,27 +150,26 @@ public class GT_MetaTileEntity_Boxinator return DID_NOT_FIND_RECIPE; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { - ItemStack tInput1 = getInputAt(1); - if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) || (ItemList.Schematic_2by2.isStackEqual(tInput1)) || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { - if (hasValidCache(aStack,aTypeCache,false)) - return true; - if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[mTier], null, new ItemStack[]{GT_Utility.copyAmount(64L, new Object[]{aStack}), tInput1}) != null) { - return true; - } - if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack}) != null) - return true; - if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, null, aStack, aStack}) != null) { - return true; - } - if (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack}) != null)) { - return true; - } - } else { - return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (!super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) { + return false; + } + ItemStack tInput1 = getInputAt(1); + if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) || (ItemList.Schematic_2by2.isStackEqual(tInput1)) || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { + if (hasValidCache(aStack,aTypeCache,false)) + return true; + if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[mTier], null, GT_Utility.copyAmount(64L, aStack), tInput1) != null) { + return true; + } + if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack) != null) + return true; + if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { + return true; } + 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); } - return false; } } 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 e2663a15e4..d249cae2a1 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 @@ -10,17 +10,16 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -public class GT_MetaTileEntity_CuringOven - extends GT_MetaTileEntity_BasicMachine { +public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Heats tools for hardening", 1, 1, "E_Oven.png", "", new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))}); + super(aID, aName, aNameRegional, aTier, 1, "Heats tools for hardening", 1, 1, "E_Oven.png", "", TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))); } public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -31,14 +30,17 @@ public class GT_MetaTileEntity_CuringOven 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); } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (ItemList.Cell_Empty.isStackEqual(aStack)); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ItemList.Cell_Empty.isStackEqual(aStack); } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return false; } @@ -84,4 +86,4 @@ public class GT_MetaTileEntity_CuringOven } } } -}
\ No newline at end of file +} 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 ce1812a9cf..b820dd44fd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,20 +1,87 @@ package gregtech.common.tileentities.machines.basic; +import com.google.common.collect.ArrayListMultimap; +import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.ItemData; +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.init.Items; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.oredict.OreDictionary; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import static gregtech.api.enums.Textures.BlockIcons.*; + +public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachine { -public class GT_MetaTileEntity_Disassembler - extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Disassembler(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Disassembles Machines at " + Math.min(50 + 10 * aTier,100) + "% Efficiency", 1, 9, "Disassembler.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER)}); + super( + aID, + aName, + aNameRegional, + aTier, + 1, + new String[]{ + "Disassembles Machines up to " + GT_Values.TIER_COLORS[aTier] + GT_Values.VOLTAGE_NAMES[aTier], + "Can also disassemble most assembler recipes!" + }, + 1, + 9, + "Disassembler.png", + "", + + //Textures + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), + 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()) + ); } public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -25,83 +92,438 @@ public class GT_MetaTileEntity_Disassembler 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); } + 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) + } + }; + + 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) + } + }; + + public static ArrayListMultimap<GT_ItemStack, ItemStack> getOutputHardOverrides() { + return outputHardOverrides; + } + + private static final ArrayListMultimap<GT_ItemStack, ItemStack> outputHardOverrides; + + private static final Set<GT_ItemStack> blackList; + + public static Set<GT_ItemStack> getBlackList() { + return blackList; + } + + static { + outputHardOverrides = ArrayListMultimap.create(); + outputHardOverrides.put(new GT_ItemStack(new ItemStack(Blocks.torch,6)), new ItemStack(Items.stick)); + blackList = new HashSet<>(); + blackList.add(new GT_ItemStack(ItemList.Casing_Coil_Superconductor.get(1L))); + } + + private boolean compareToUnpacker(ItemStack is){ + return null != GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.findRecipe( + null, + true, + true, + Long.MAX_VALUE, + null, + is); + } + + @Override public int checkRecipe() { - //if ((getInputAt(0) != null) && (isOutputEmpty())) { - // if(GT_Utility.areStacksEqual(getInputAt(0), new ItemStack(Items.egg))){ - // getInputAt(0).stackSize -= 1; - // this.mEUt = (16 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); - // this.mMaxProgresstime = 2400; - // this.mMaxProgresstime = this.mMaxProgresstime >> (mTier); - //if (getBaseMetaTileEntity().getRandomNumber(100) < (this.mTier+1)) { - // this.mOutputItems[0] = ItemList.Circuit_Chip_Stemcell.get(1, new Object[0]); - //} - //return 2; - //} - NBTTagCompound tNBT = getInputAt(0).getTagCompound(); - if (tNBT != null) { - tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); - if (tNBT != null) { - boolean isAnyOutput=false; - calculateOverclockedNessDisassembler(16); - this.mMaxProgresstime = 80; - //In case recipe is too OP for that machine - if (mEUt == Integer.MAX_VALUE - 1)//&& mMaxProgresstime==Integer.MAX_VALUE-1 - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - for (int i = 0; i < this.mOutputItems.length; i++) { - if (getBaseMetaTileEntity().getRandomNumber(100) < 50 + 10 * this.mTier) { - this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i); - if (this.mOutputItems[i] != null) { - this.mMaxProgresstime *= 1.7F; - isAnyOutput=true; - } - } - } - if(!isAnyOutput) - return DID_NOT_FIND_RECIPE; - for(int i=mTier-5;i>0;i--){ - this.mMaxProgresstime>>=1; - if(this.mMaxProgresstime==0) - this.mEUt = this.mEUt>>1; - } - if(this.mEUt==0) - mEUt = 1; - if(this.mMaxProgresstime==0) - this.mMaxProgresstime = 1; - getInputAt(0).stackSize -= 1; - return FOUND_AND_SUCCESSFULLY_USED_RECIPE; - } + ItemStack is = getInputAt(0); + + if (GT_Utility.isStackInvalid(is)) + return DID_NOT_FIND_RECIPE; + + if ( + is.getItem() instanceof GT_MetaGenerated_Tool + || blackList.contains(new GT_ItemStack(is)) + || compareToUnpacker(is) + ) + return DID_NOT_FIND_RECIPE; + + if (checkTier(is)) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + + Integer handleHardOverride = handleHardOverride(is); + if (handleHardOverride != null) + return handleHardOverride; + + return process(); + } + + private Integer handleHardOverride(ItemStack is) { + Set<GT_ItemStack> stacks = outputHardOverrides.keySet(); + for (GT_ItemStack stack : stacks) { + ItemStack in = is.copy(); + in.stackSize = 1; + if (stack.isStackEqual(in) && stack.mStackSize <= is.stackSize) { + return setOutputsAndTime(outputHardOverrides.get(stack).toArray(new ItemStack[0]), stack.mStackSize) + ? FOUND_AND_SUCCESSFULLY_USED_RECIPE + : DID_NOT_FIND_RECIPE; } + } + return null; + } + + private boolean checkTier(ItemStack is) { + ItemStack comp = new ItemStack(GregTech_API.sBlockMachines); + if (is.getItem() == comp.getItem()) { + IMetaTileEntity iMetaTileEntity = GregTech_API.METATILEENTITIES[is.getItemDamage()]; + + return iMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock && + ((GT_MetaTileEntity_TieredMachineBlock) iMetaTileEntity).mTier > this.mTier; + } + return false; + } + + private int process(){ + int statusCode = checkRecipeMap(); + if (statusCode != DID_NOT_FIND_RECIPE) + return statusCode; + + return onTheFlyGeneration(); + } + + private int onTheFlyGeneration() { + Collection<DissassembleReference> recipes = this.findRecipeFromMachine(); + if (recipes.isEmpty()) + return DID_NOT_FIND_RECIPE; + + DissassembleReference recipe = ensureDowncasting(recipes); + + removeInvalidStacks(recipe); + + return setOutputsAndTime(recipe.inputs, recipe.stackSize) + ? FOUND_AND_SUCCESSFULLY_USED_RECIPE + : FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + + private void removeInvalidStacks(DissassembleReference recipe) { + for (int i = 0; i < recipe.inputs.length; i++) + if (GT_Utility.isStackInvalid(recipe.inputs[i]) || recipe.inputs[i].stackSize < 1) + recipe.inputs[i] = null; + + recipe.inputs = GT_Utility.getArrayListWithoutNulls(recipe.inputs).toArray(new ItemStack[0]); + } + + private int checkRecipeMap() { + GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe(this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs()); + if (gt_recipe == null) + return DID_NOT_FIND_RECIPE; + if (gt_recipe.isRecipeInputEqual(false, null, this.getAllInputs())) + return setOutputsAndTime(gt_recipe.mOutputs, gt_recipe.mInputs[0].stackSize) + ? FOUND_AND_SUCCESSFULLY_USED_RECIPE + : FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + + private boolean setOutputsAndTime(ItemStack[] inputs, int stackSize){ + if (this.getInputAt(0).stackSize >= stackSize) + this.getInputAt(0).stackSize -= stackSize; + else + return false; + + System.arraycopy(inputs, 0, this.mOutputItems, 0, inputs.length); + this.calculateOverclockedNess(30,600); - return DID_NOT_FIND_RECIPE; + return true; } - private void calculateOverclockedNessDisassembler(int aEUt) { - if(mTier==0){ - mEUt=aEUt>>2; - }else{ - //Long EUt calculation - long xEUt=aEUt; - //Isnt too low EUt check? - long tempEUt = xEUt<GT_Values.V[1] ? GT_Values.V[1] : xEUt; + private static DissassembleReference ensureDowncasting(Collection<? extends DissassembleReference> recipes) { + ItemStack[] inputs = recipes.stream() + .findFirst() + .orElseThrow(NullPointerException::new) + .inputs; - while (tempEUt <= GT_Values.V[mTier -1] * (long)mAmperage) { - tempEUt<<=2;//this actually controls overclocking - xEUt<<=2;//this is effect of overclocking + 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()); + + handleRecipeTransformation(inputs, output, recipesColl); + + return new DissassembleReference(recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new), output, null); + } + + private static void handleRecipeTransformation(ItemStack[] inputs, ItemStack[] output, List<? extends GT_Recipe> recipesColl) { + for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) { + Set<ItemStack[]> inputsStacks = null; + if (recipesColl != null) + inputsStacks = recipesColl.stream() + .map(x -> x.mInputs) + .collect(Collectors.toSet()); + handleRecipeTransformationInternal(inputs, output, inputsStacks, i); + } + addOthersAndHandleAlwaysReplace(inputs, output); + } + + /** + * Public Interface for ReverseRecipes, do not call inside of this class. + */ + 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) { + ItemStack input = inputs[i]; + ItemData data = GT_OreDictUnificator.getItemData(input); + if (data == null || data.mMaterial == null || data.mMaterial.mMaterial == null || data.mPrefix == null) { + output[i] = input; + return; + } + handleReplacement(inputsStacks, data, output, input, i); + } + + private static void addOthersAndHandleAlwaysReplace(ItemStack[] inputs, ItemStack[] output){ + for (int i = 0; i < inputs.length; i++) { + //Adds rest of Items + if (output[i] == null) + output[i] = inputs[i]; + + //Math.min the recipe output if Items are the same + if (GT_Utility.areStacksEqual(output[i], inputs[i])) + output[i].stackSize = Math.min(output[i].stackSize, inputs[i].stackSize); + + //Handles replacement Overrides + ItemStack[] itemStacks = alwaysReplace[0]; + for (int j = 0; j < itemStacks.length; j++) { + ItemStack x = itemStacks[j]; + if (GT_Utility.areStacksEqual(x, output[i], true)) { + output[i] = alwaysReplace[1][j]; + break; + } } - if(xEUt>Integer.MAX_VALUE-1){ - mEUt = Integer.MAX_VALUE-1; - }else{ - mEUt = (int)xEUt; + + //Unification + output[i] = handleUnification(output[i]); + } + } + + private static ItemStack handleUnification(ItemStack stack) { + for (int oreID : OreDictionary.getOreIDs(stack)) { + for (int i = 0; i < OreDictionaryOverride[0].length; i++) + if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])){ + ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy(); + ret.stackSize = stack.stackSize; + return ret; + } + } + return GT_OreDictUnificator.get(stack); + } + + private static void handleReplacement(Set<ItemStack[]> inputsStacks, ItemData data, ItemStack[] output, ItemStack input, int i){ + AtomicReference<Materials> toRpl = new AtomicReference<>(); + Materials first = data.mMaterial.mMaterial; + if (inputsStacks != null) { + handleInputStacks(inputsStacks, toRpl, data, first, i); + } + if (toRpl.get() == null) { + //Remove Magnetic and Annealed Modifiers + handleBetterMaterialsVersions(data, toRpl); + } + if (toRpl.get() != null) { + output[i] = GT_OreDictUnificator.get(data.mPrefix, toRpl.get(), input.stackSize); + return; + } + if (data.mPrefix == OrePrefixes.circuit) { + handleCircuits(first, output, input, i); + } + } + + private static void handleInputStacks(Set<ItemStack[]> inputsStacks, AtomicReference<? super Materials> toRpl, ItemData data, Materials first, int i){ + final int finalIndex = i; + inputsStacks.forEach(stackArray -> { + ItemData dataAgainst = GT_OreDictUnificator.getItemData(stackArray[finalIndex]); + if ( + dataAgainst == null || + dataAgainst.mMaterial == null || + dataAgainst.mMaterial.mMaterial == null || + dataAgainst.mPrefix == null || + dataAgainst.mPrefix != data.mPrefix + ) { + return; } + handleDifferentMaterialsOnRecipes(first, dataAgainst.mMaterial.mMaterial, toRpl); + handleAnyMaterials(first,toRpl); + }); + } + + private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl){ + if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) + toRpl.set(Materials.Iron); + else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyCopper))) + toRpl.set(Materials.Copper); + else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyRubber))) + toRpl.set(Materials.Rubber); + else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyBronze))) + toRpl.set(Materials.Bronze); + else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnySyntheticRubber))) + toRpl.set(Materials.Rubber); + } + + private static void handleDifferentMaterialsOnRecipes(Materials first, Materials second, AtomicReference<? super Materials> toRpl){ + if (!first.equals(second)) + if (first.equals(Materials.Aluminium) && second.equals(Materials.Iron)) + toRpl.set(second); + else if (first.equals(Materials.Steel) && second.equals(Materials.Iron)) + toRpl.set(second); + else if (first.equals(Materials.WroughtIron) && second.equals(Materials.Iron)) + toRpl.set(second); + else if (first.equals(Materials.Aluminium) && second.equals(Materials.WroughtIron)) + toRpl.set(Materials.Iron); + else if (first.equals(Materials.Aluminium) && second.equals(Materials.Steel)) + toRpl.set(second); + else if (first.equals(Materials.Polytetrafluoroethylene) && second.equals(Materials.Plastic)) + toRpl.set(second); + else if (first.equals(Materials.Polybenzimidazole) && second.equals(Materials.Plastic)) + toRpl.set(second); + else if (first.equals(Materials.Polystyrene) && second.equals(Materials.Plastic)) + toRpl.set(second); + else if (first.equals(Materials.Silicone) && second.equals(Materials.Plastic)) + toRpl.set(second); + else if (first.equals(Materials.NetherQuartz) || first.equals(Materials.CertusQuartz) && second.equals(Materials.Quartzite)) + toRpl.set(second); + else if (first.equals(Materials.Plastic) && second.equals(Materials.Wood)) + toRpl.set(second); + else if (first.equals(Materials.Diamond) && second.equals(Materials.Glass)) + toRpl.set(second); + } + + private static void handleBetterMaterialsVersions(ItemData data, AtomicReference<? super Materials> toRpl){ + if (Materials.SteelMagnetic.equals(data.mMaterial.mMaterial)) { + toRpl.set(Materials.Steel); + } else if (Materials.IronMagnetic.equals(data.mMaterial.mMaterial)) { + toRpl.set(Materials.Iron); + } else if (Materials.NeodymiumMagnetic.equals(data.mMaterial.mMaterial)) { + toRpl.set(Materials.Neodymium); + } else if (Materials.SamariumMagnetic.equals(data.mMaterial.mMaterial)) { + toRpl.set(Materials.Samarium); + } else if (Materials.AnnealedCopper.equals(data.mMaterial.mMaterial)) { + toRpl.set(Materials.Copper); + } + } + + @SuppressWarnings("deprecation") + private static void handleCircuits(Materials first, ItemStack[] output, ItemStack input, int i){ + if (first.equals(Materials.Primitive)) + output[i] = ItemList.NandChip.get(input.stackSize); + else if (first.equals(Materials.Basic)) + output[i] = ItemList.Circuit_Microprocessor.get(input.stackSize); + else if (first.equals(Materials.Good)) + output[i] = ItemList.Circuit_Good.get(input.stackSize); + else if (first.equals(Materials.Advanced)) + output[i] = ItemList.Circuit_Advanced.get(input.stackSize); + else if (first.equals(Materials.Data)) + output[i] = ItemList.Circuit_Data.get(input.stackSize); + else if (first.equals(Materials.Master)) + output[i] = ItemList.Circuit_Master.get(input.stackSize); + else if (first.equals(Materials.Ultimate)) + output[i] = ItemList.Circuit_Quantummainframe.get(input.stackSize); + else if (first.equals(Materials.Superconductor)) + output[i] = ItemList.Circuit_Crystalmainframe.get(input.stackSize); + else if (first.equals(Materials.Infinite)) + output[i] = ItemList.Circuit_Wetwaremainframe.get(input.stackSize); + else if (first.equals(Materials.Bio)) + output[i] = ItemList.Circuit_Biomainframe.get(input.stackSize); + } + + static class DissassembleReference { + final int stackSize; + ItemStack[] inputs; + final GT_Recipe recipe; + + public DissassembleReference(int stackSize, ItemStack[] inputs, GT_Recipe recipe) { + this.stackSize = stackSize; + this.inputs = inputs; + this.recipe = recipe; } } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return //(aIndex == 4 && GT_Utility.areStacksEqual(aStack, new ItemStack(Items.egg))) || - (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); + private Collection<DissassembleReference> findRecipeFromMachine() { + ItemStack is = getInputAt(0); + if (GT_Utility.isStackInvalid(is)) + return Collections.emptySet(); + + AtomicInteger stacksize = new AtomicInteger(); + //Check Recipe Maps for creation of Item + List<DissassembleReference> possibleRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream() + .filter(x -> Arrays.stream(x.mOutputs) + .anyMatch(y -> + { + ItemStack out = is.copy(); + out.stackSize = y.stackSize; + boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize; + if (isDone) + stacksize.set(y.stackSize); + return isDone; + }) + ) + .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; + + //There are Multiple Ways -> Get recipe with cheapest inputs + //More Inputs should mean cheaper Materials + return possibleRecipes + .stream() + .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs)) + .collect(Collectors.toList()); + } + + private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x){ + double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs).flatMapToInt(f -> IntStream.of(f.amount)).sum(); + fluidInputValueRaw = fluidInputValueRaw > 0 ? fluidInputValueRaw : 144D; + double inputValue = Arrays.stream(x.inputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum() + + (fluidInputValueRaw / 144D); + double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs).flatMapToInt(f -> IntStream.of(f.amount)).sum(); + fluidOutputValueRaw = fluidOutputValueRaw > 0 ? fluidOutputValueRaw : 144D; + double outputValue = Arrays.stream(x.recipe.mOutputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum() + + (fluidOutputValueRaw / 144D); + return inputValue / outputValue; + } + + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && aStack.getTagCompound() != null && aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null; } } 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 1ffcd3f4f3..68dd9f2fee 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -1,26 +1,52 @@ package gregtech.common.tileentities.machines.basic; -import gregtech.api.enums.*; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Recipe; import net.minecraftforge.fluids.FluidStack; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; -public class GT_MetaTileEntity_Massfabricator - extends GT_MetaTileEntity_BasicMachine { +public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMachine { public static int sUUAperUUM = 1; public static int sUUASpeedBonus = 4; public static int sDurationMultiplier = 3215; public static boolean sRequiresUUA = false; public GT_MetaTileEntity_Massfabricator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "UUM = Matter * Fabrication Squared", 1, 1, "Massfabricator.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB)}); + super(aID, aName, aNameRegional, aTier, 1, "UUM = Matter * Fabrication Squared", 1, 1, "Massfabricator.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_MASSFAB), + 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.of( + TextureFactory.of(OVERLAY_FRONT_MASSFAB), + 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.of( + TextureFactory.of(OVERLAY_TOP_MASSFAB), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_MASSFAB), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW).glow().build())); } public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -31,10 +57,12 @@ public class GT_MetaTileEntity_Massfabricator super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } + @Override public void onConfigLoad(GT_Config aConfig) { super.onConfigLoad(aConfig); sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); @@ -54,6 +82,7 @@ public class GT_MetaTileEntity_Massfabricator return V[mTier] * 512L; } + @Override public int checkRecipe() { FluidStack tFluid = getDrainableStack(); if ((tFluid == null) || (tFluid.amount < getCapacity())) { @@ -71,54 +100,57 @@ public class GT_MetaTileEntity_Massfabricator } return 0; } - @Override + + @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes; } private void calculateOverclockedNessMassFabricator() { - if(mTier==0){ + if (mTier == 0) { //Long time calculation - long xMaxProgresstime = ((long)sDurationMultiplier)<<1; - if(xMaxProgresstime>Integer.MAX_VALUE-1){ + long xMaxProgresstime = ((long) sDurationMultiplier) << 1; + if (xMaxProgresstime > Integer.MAX_VALUE - 1) { //make impossible if too long - mEUt=Integer.MAX_VALUE-1; - mMaxProgresstime=Integer.MAX_VALUE-1; - }else{ - mEUt= (int)(GT_Values.V[1]<<2);//2^2=4 so shift <<2 - mMaxProgresstime=(int)xMaxProgresstime; + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = (int) (V[1] << 2);//2^2=4 so shift <<2 + mMaxProgresstime = (int) xMaxProgresstime; } - }else{ + } else { //Long EUt calculation - long xEUt=GT_Values.V[1] * (long)Math.pow(2,mTier+2); + long xEUt = V[1] * (long) Math.pow(2, mTier + 2); - long tempEUt = GT_Values.V[1]; + long tempEUt = V[1]; mMaxProgresstime = sDurationMultiplier; - while (tempEUt <= V[mTier -1]) { - tempEUt<<=2;//this actually controls overclocking - mMaxProgresstime>>=1;//this is effect of overclocking - if(mMaxProgresstime==0) - xEUt = (long)(xEUt/1.1D);//U know, if the time is less than 1 tick make the machine use less power + while (tempEUt <= V[mTier - 1]) { + tempEUt <<= 2;//this actually controls overclocking + mMaxProgresstime >>= 1;//this is effect of overclocking + if (mMaxProgresstime == 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){ - mEUt = Integer.MAX_VALUE-1; - mMaxProgresstime = Integer.MAX_VALUE-1; - }else{ - mEUt = (int)xEUt; - if(mEUt==0) + if (xEUt > Integer.MAX_VALUE - 1) { + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = (int) xEUt; + if (mEUt == 0) mEUt = 1; - if(mMaxProgresstime==0) + if (mMaxProgresstime == 0) mMaxProgresstime = 1;//set time to 1 tick } } } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return aFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)); } + @Override public int getCapacity() { return Math.max(sUUAperUUM, 1000); } 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 f84c33d422..01f136747c 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 @@ -3,14 +3,13 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_MicrowaveEnergyTransmitter; @@ -25,6 +24,11 @@ import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEntity_BasicTank { @@ -79,6 +83,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public String[] getInfoData() { return new String[]{ "Coordinates:", @@ -93,9 +98,18 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @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) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)}; + 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()}; } + @Override public void saveNBTData(NBTTagCompound aNBT) { if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); aNBT.setInteger("mTargetX", this.mTargetX); @@ -105,6 +119,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt aNBT.setBoolean("mDebug", this.mDebug); } + @Override public void loadNBTData(NBTTagCompound aNBT) { mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); this.mTargetX = aNBT.getInteger("mTargetX"); @@ -114,6 +129,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt this.mDebug = aNBT.getBoolean("mDebug"); } + @Override public void onConfigLoad(GT_Config aConfig) { sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); mMaxLoss = Math.max(aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLoss", 50), 11); 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 69543a7196..4d7a6c4af5 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 @@ -5,13 +5,12 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -36,9 +35,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { int drillY = 0; boolean isPickingPipes; boolean waitMiningPipe; - final static int[] RADIUS = new int[]{8, 8, 16, 24, 32}; //Miner radius per tier - final static int[] SPEED = new int[]{160, 160, 80, 40, 20}; //Miner cycle time per tier - final static int[] ENERGY = new int[]{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 private int radiusConfig; //Miner configured radius private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>(); @@ -52,14 +51,14 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { "Maximum work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1), "Fortune bonus of " + aTier}, 2, 2, "Miner.png", "", - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), - new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); radiusConfig = RADIUS[mTier]; } @@ -79,8 +78,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { return new GT_MetaTileEntity_Miner(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName); } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getItem() == MINING_PIPE.getItem()); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && aStack.getItem() == MINING_PIPE.getItem(); } public boolean hasFreeSpace() { @@ -175,10 +175,19 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { if (drillY == 0 || oreBlockPositions.isEmpty()) { moveOneDown(aBaseMetaTileEntity); } else { - ChunkPosition oreBlockPos = oreBlockPositions.remove(0); - mineBlock(aBaseMetaTileEntity, oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); - if (debugBlockMiner) { - GT_Log.out.println("MINER: Mining GT ore block at " + oreBlockPos.chunkPosX + " " + drillY + " " + oreBlockPos.chunkPosZ); + ChunkPosition oreBlockPos; + Block block; + do { + oreBlockPos = oreBlockPositions.remove(0); + block = aBaseMetaTileEntity.getBlockOffset(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + } // someone else might have removed the block + while (block == Blocks.air && !oreBlockPositions.isEmpty()); + + if (block != Blocks.air) { + mineBlock(aBaseMetaTileEntity, block, + aBaseMetaTileEntity.getXCoord() + oreBlockPos.chunkPosX, + aBaseMetaTileEntity.getYCoord() + oreBlockPos.chunkPosY, + aBaseMetaTileEntity.getZCoord() + oreBlockPos.chunkPosZ); } } } @@ -195,7 +204,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(x, drillY, z); if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) oreBlockPositions.add(new ChunkPosition(x, drillY, z)); - } else if (GT_Utility.isOre(new ItemStack(block, 1, blockMeta))) + } else if (GT_Utility.isOre(block, blockMeta)) oreBlockPositions.add(new ChunkPosition(x, drillY, z)); } } @@ -236,11 +245,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { waitMiningPipe = true; return false; } - if (aBaseMetaTileEntity.getBlockOffset(0, drillY - 1, 0) != Blocks.air) { - mineBlock(aBaseMetaTileEntity, 0, drillY - 1, 0); - if (debugBlockMiner) { - GT_Log.out.println("MINER: Removed block to replace with pipe" ); - } + Block block = aBaseMetaTileEntity.getBlockOffset(0, drillY - 1, 0); + if (block != Blocks.air) { + mineBlock(aBaseMetaTileEntity, block, xCoord, yCoord + drillY - 1, zCoord); } aBaseMetaTileEntity.getWorld().setBlock(xCoord, yCoord + drillY - 1, zCoord, MINING_PIPE_TIP_BLOCK); drillY--; @@ -248,18 +255,20 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { return true; } - public void mineBlock(IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z) { - if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z, true)) { + public void mineBlock(IGregTechTileEntity aBaseMetaTileEntity, Block block, int x, int y, int z) { + if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), x, y, z, true)) { if (debugBlockMiner) - GT_Log.out.println("MINER: FakePlayer cannot mine block at " + (aBaseMetaTileEntity.getXCoord() + x) + ", " + (aBaseMetaTileEntity.getYCoord() + y) + ", " + (aBaseMetaTileEntity.getZCoord() + z)); - return; + GT_Log.out.println("MINER: FakePlayer cannot mine block at " + x + ", " + y + ", " + z); + } else { + ArrayList<ItemStack> drops = getBlockDrops(block, x, y, z); + if (drops.size() > 0) + mOutputItems[0] = drops.get(0); + if (drops.size() > 1) + mOutputItems[1] = drops.get(1); + aBaseMetaTileEntity.getWorld().setBlockToAir(x, y, z); + if (debugBlockMiner) + GT_Log.out.println("MINER: Mining GT ore block at " + x + " " + y + " " + z); } - ArrayList<ItemStack> drops = getBlockDrops(aBaseMetaTileEntity.getBlockOffset(x, y, z), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z); - if (drops.size() > 0) - mOutputItems[0] = drops.get(0); - if (drops.size() > 1) - mOutputItems[1] = drops.get(1); - aBaseMetaTileEntity.getWorld().setBlockToAir(aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z); } private ArrayList<ItemStack> getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) { 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 1ee6203593..1e1beaf528 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -1,16 +1,23 @@ package gregtech.common.tileentities.machines.basic; -import gregtech.api.enums.Textures; 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_SpawnEventHandler; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.Arrays; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_TieredMachineBlock { @@ -28,19 +35,28 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered 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); } @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 != 1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)}; + 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()}; } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) { - int[] tCoords = new int[]{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); } @@ -54,14 +70,14 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - int[] tCoords = new int[]{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 = new int[]{this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId}; - GT_SpawnEventHandler.mobReps.remove(tCoords); + 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)); } @Override 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 59b43cbcb2..60056ec39d 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,12 +2,11 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -16,10 +15,36 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -public class GT_MetaTileEntity_PotionBrewer - extends GT_MetaTileEntity_BasicMachine { +import static gregtech.api.enums.Textures.BlockIcons.*; + +public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER)}); + super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_POTIONBREWER), + 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.of( + TextureFactory.of(OVERLAY_FRONT_POTIONBREWER), + 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.of( + TextureFactory.of(OVERLAY_TOP_POTIONBREWER), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER), + 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) { @@ -30,14 +55,17 @@ public class GT_MetaTileEntity_PotionBrewer 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); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return GT_Recipe.GT_Recipe_Map.sBrewingRecipes; } + @Override public int checkRecipe() { int tCheck = super.checkRecipe(); if (tCheck != DID_NOT_FIND_RECIPE) { @@ -88,7 +116,7 @@ public class GT_MetaTileEntity_PotionBrewer } if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) { if (!tModifier.startsWith("strong")) { - return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("long")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("long", "")); @@ -97,7 +125,7 @@ public class GT_MetaTileEntity_PotionBrewer } if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) { if (!tModifier.startsWith("long")) { - return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("strong")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", "")); @@ -115,7 +143,7 @@ public class GT_MetaTileEntity_PotionBrewer return 0; } - private final int setOutput(String aFluidName) { + private int setOutput(String aFluidName) { this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750); if (this.mOutputFluid == null) { this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount); @@ -131,14 +159,17 @@ public class GT_MetaTileEntity_PotionBrewer return 2; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + @Override + public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid)); } + @Override public int getCapacity() { return 750; } 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 44c39612c6..87105620ea 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 @@ -12,16 +12,16 @@ import net.minecraft.item.ItemStack; import java.util.ArrayList; -public class GT_MetaTileEntity_Printer - extends GT_MetaTileEntity_BasicMachine { +public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName, new ITexture[0]); + super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName); } public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); } + @Override public int checkRecipe() { if (getOutputAt(0) != null) { this.mOutputBlocked += 1; @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_Printer 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, new Object[]{tList.get(i + 1)}); + 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) @@ -49,6 +49,7 @@ public class GT_MetaTileEntity_Printer return 0; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return null; } 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 0ff9f527e5..e1dfc32aba 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 @@ -8,7 +8,7 @@ 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; @@ -27,9 +27,12 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; -import java.util.*; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; -import static gregtech.api.enums.GT_Values.D1; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.debugBlockPump; @@ -54,13 +57,16 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public Block mSecondaryPumpedBlock = null; private int radiusConfig; //Pump configured radius + private boolean mRetractDone = false; public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 3, new String[]{"The best way to empty Oceans! Outputs on top", - getEuUsagePerTier(aTier) + " EU/operation, " + GT_Utility.safeInt(160 / (long)Math.pow(2, aTier) ) + " sec per bucket, no stuttering", + 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 Screwdriver to regulate pumping area", + "Disable itself upon hitting rocks", + "Disable the bottom pump to retract the pipe!"}); radiusConfig = getMaxDistanceForTier(mTier); } @@ -79,6 +85,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public void saveNBTData(NBTTagCompound aNBT) { boolean wasPumping = this.wasPumping || !this.mPumpList.isEmpty(); if (debugBlockPump) { @@ -91,6 +98,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { aNBT.setInteger("radiusConfig", radiusConfig); } + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.wasPumping = aNBT.getBoolean("wasPumping"); @@ -205,86 +213,131 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } if (this.mPumpCountBelow <= 0) { // Only the bottom most pump does anything - if ((getBaseMetaTileEntity().isAllowedToWork()) && (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.wasPumping){ - tMovedOneDown = moveOneDown(); - if (debugBlockPump) { - GT_Log.out.println("PUMP: Moved down"); + if (getBaseMetaTileEntity().isAllowedToWork()) { + mRetractDone = false; + 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.wasPumping) { + tMovedOneDown = moveOneDown(); + if (!tMovedOneDown) { + if (canMoveDown(getBaseMetaTileEntity().getXCoord(), Math.max(getYOfPumpHead() - 1, 1), getBaseMetaTileEntity().getZCoord())) { + if (debugBlockPump) { + GT_Log.out.println("PUMP: No pipe left. Idle for a little longer."); + } + this.mPumpTimer = 160; + } else { + getBaseMetaTileEntity().disableWorking(); + if (debugBlockPump) { + GT_Log.out.println("PUMP: Can't move. Retracting in next few ticks"); + } + } + } else if (debugBlockPump) { + GT_Log.out.println("PUMP: Moved down"); + } + } else if (debugBlockPump) { + GT_Log.out.println("PUMP: Was pumping, didn't move down"); } - } else if (debugBlockPump) { - GT_Log.out.println("PUMP: Was pumping, didn't move down"); } - } - 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(); + int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); - 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); - } - // First look down - checkForFluidToPump(x, y - 1, z ); - - // Then look all around - checkForFluidToPump(x, y, z + 1); - checkForFluidToPump(x, y, z - 1); - checkForFluidToPump(x + 1, y, z ); - checkForFluidToPump(x - 1, y, z ); - this.clearQueue(false); - - if(this.hasValidFluid()) { - // Don't move down and rebuild the queue if we now have a valid fluid - this.wasPumping = true; - } + if (!this.hasValidFluid()) { + // We don't have a valid block, let's try to find one + int y = getYOfPumpHead(); - } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { - // We didn't just look for a block, and the pump head is below the pump - if ((tMovedOneDown) || this.wasPumping || - ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || - (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) - { - // Rebuild the list to pump if any of the following conditions are true: - // 1) We just moved down - // 2) We were previously pumping (and possibly just reloaded) - // 3) We have an empty queue and enough time has passed - // 4) A long while has has passed - if (debugBlockPump) { - GT_Log.out.println("PUMP: Rebuilding pump list - Size " + - this.mPumpList.size() + " WasPumping: " + this.wasPumping + " Timer " + getBaseMetaTileEntity().getTimer()); + 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); + } + // First look down + checkForFluidToPump(x, y - 1, z); + + // Then look all around + checkForFluidToPump(x, y, z + 1); + checkForFluidToPump(x, y, z - 1); + checkForFluidToPump(x + 1, y, z); + checkForFluidToPump(x - 1, y, z); + this.clearQueue(false); + + if (this.hasValidFluid()) { + // Don't move down and rebuild the queue if we now have a valid fluid + this.wasPumping = true; } - int yPump = getBaseMetaTileEntity().getYCoord() - 1, yHead = getYOfPumpHead(); - this.rebuildPumpQueue(x, yPump, z, yHead); + } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { + // We didn't just look for a block, and the pump head is below the pump + if ((tMovedOneDown) || this.wasPumping || + ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || + (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) + { + // Rebuild the list to pump if any of the following conditions are true: + // 1) We just moved down + // 2) We were previously pumping (and possibly just reloaded) + // 3) We have an empty queue and enough time has passed + // 4) A long while has has passed + if (debugBlockPump) { + GT_Log.out.println("PUMP: Rebuilding pump list - Size " + + this.mPumpList.size() + " WasPumping: " + this.wasPumping + " Timer " + getBaseMetaTileEntity().getTimer()); + } + int yPump = getBaseMetaTileEntity().getYCoord() - 1, yHead = getYOfPumpHead(); - if (debugBlockPump) { - GT_Log.out.println("PUMP: Rebuilt pump list - Size " + this.mPumpList.size()); - } + this.rebuildPumpQueue(x, yPump, z, yHead); - } - if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { - while ((!this.mPumpList.isEmpty())) { - ChunkPosition pos = this.mPumpList.pollLast(); - if (consumeFluid(pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ)) { - // Keep trying until we consume something, or the list is empty - break; + if (debugBlockPump) { + GT_Log.out.println("PUMP: Rebuilt pump list - Size " + this.mPumpList.size()); } + + } + if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { + while ((!this.mPumpList.isEmpty())) { + ChunkPosition pos = this.mPumpList.pollLast(); + if (consumeFluid(pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ)) { + // Keep trying until we consume something, or the list is empty + break; + } + } + this.mPumpTimer = GT_Utility.safeInt(160 / (long) Math.pow(2, this.mTier)); + this.mPumpTimer = mPumpTimer == 0 ? 1 : mPumpTimer; + } + } else { + // We somehow have a valid fluid, but the head of the pump isn't below the pump. Perhaps someone broke some pipes + // -- Clear the queue and we should try to move down until we can find a valid fluid + this.clearQueue(false); + } + } else if (debugBlockPump) { + GT_Log.out.println("PUMP: Not enough energy? Free space?"); + } + } else { + if (!mRetractDone && ((aTick % 5) == 0) && ((this.mInventory[0] == null) || this.mInventory[0].stackSize == 0 || (GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE) && (this.mInventory[0].stackSize < this.mInventory[0].getMaxStackSize())))) { + // try retract if all of these conditions are met + // 1. not retracted yet + // 2. once per 5 tick + // 3. can hold retracted pipe in inventory + int tHeadY = getYOfPumpHead(); + if (tHeadY < this.getBaseMetaTileEntity().getYCoord()) { + final int tXCoord = this.getBaseMetaTileEntity().getXCoord(); + final int tZCoord = this.getBaseMetaTileEntity().getZCoord(); + this.getBaseMetaTileEntity().getWorld().setBlockToAir(tXCoord, tHeadY, tZCoord); + if (tHeadY < this.getBaseMetaTileEntity().getYCoord() - 1) { + getBaseMetaTileEntity().getWorld().setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK); + } + if (this.mInventory[0] == null) { + final ItemStack copy = MINING_PIPE.copy(); + copy.stackSize = 1; + this.setInventorySlotContents(0, copy); + } else { + this.mInventory[0].stackSize++; + } + if (debugBlockPump) { + GT_Log.out.println("PUMP: Retracted one pipe"); + } + } else { + mRetractDone = true; + if (debugBlockPump) { + GT_Log.out.println("PUMP: Retract done"); } - this.mPumpTimer = GT_Utility.safeInt(160 / (long)Math.pow(2, this.mTier) ); - this.mPumpTimer = mPumpTimer==0 ? 1 : mPumpTimer; } - } else { - // We somehow have a valid fluid, but the head of the pump isn't below the pump. Perhaps someone broke some pipes - // -- Clear the queue and we should try to move down until we can find a valid fluid - this.clearQueue(false); } - } else if (debugBlockPump) { - GT_Log.out.println("PUMP: Disable? Not enough energy? Free space?"); } getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty()); } @@ -305,11 +358,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } private int getMaxPumpableDistance() { - return GT_MetaTileEntity_Pump.getMaxDistanceForTier(this.mTier); + return getMaxDistanceForTier(this.mTier); } private long getEuUsagePerAction() { - return GT_MetaTileEntity_Pump.getEuUsagePerTier(this.mTier); + return getEuUsagePerTier(this.mTier); } private boolean hasValidFluid() { @@ -490,6 +543,21 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mSecondaryPumpedBlock = null; } + /** only check if block below can be replaced with pipe tip. pipe stockpile condition is ignored */ + private boolean canMoveDown(int aX, int aY, int aZ) { + if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), aX, aY, aZ, true)) return false; + + Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); + + return GT_Utility.isBlockValid(aBlock) && + (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) { // Try to consume a fluid at a location // Returns true if something was consumed, otherwise false @@ -656,7 +724,7 @@ 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) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)}; + 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 @@ -667,8 +735,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(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), TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP),}; } private FakePlayer mFakePlayer = null; 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 92475d5ae6..d6879d31b5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -1,12 +1,15 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.Element; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -17,12 +20,15 @@ import net.minecraftforge.fluids.FluidStack; import java.util.HashMap; import java.util.NoSuchElementException; +import static gregtech.api.enums.Textures.BlockIcons.*; + 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; - public static final HashMap<Materials,Long> MASS_OVERRIDES =new HashMap<>(); - static{ + static { //put overrides here //ex. //MASS_OVERRIDES.put(Materials.get("cake"),Materials.get("cake").getMass()); @@ -32,7 +38,31 @@ public class GT_MetaTileEntity_Replicator } public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "", new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR)); + super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_REPLICATOR), + 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.of( + TextureFactory.of(OVERLAY_FRONT_REPLICATOR), + 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.of( + TextureFactory.of(OVERLAY_TOP_REPLICATOR), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR), + 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) { @@ -43,27 +73,27 @@ public class GT_MetaTileEntity_Replicator 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); } - public static final double EXPONENT = GregTech_API.sOPStuff.get("Replicator","Nerf Exponent", 1.2D); - - public static long cubicFluidMultiplier(long amount){ + public static long cubicFluidMultiplier(long amount) { return (long) Math.pow(amount, EXPONENT); } + @Override public int checkRecipe() { FluidStack tFluid = getFillableStack(); if ((tFluid != null) && (tFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)))) { ItemStack tDataOrb = getSpecialSlot(); if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) { Materials tMaterial = Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0); - long tMass = cubicFluidMultiplier(MASS_OVERRIDES.getOrDefault(tMaterial,tMaterial.getMass())); + long tMass = cubicFluidMultiplier(MASS_OVERRIDES.getOrDefault(tMaterial, tMaterial.getMass())); if ((tFluid.amount >= tMass) && (tMass > 0L)) { - this.mEUt = GT_Utility.safeInt(gregtech.api.enums.GT_Values.V[this.mTier],1); - this.mMaxProgresstime = GT_Utility.safeInt(tMass * 1024L / (1 << this.mTier),1); + this.mEUt = GT_Utility.safeInt(gregtech.api.enums.GT_Values.V[this.mTier], 1); + this.mMaxProgresstime = GT_Utility.safeInt(tMass * 1024L / (1L << this.mTier), 1); if (mMaxProgresstime == Integer.MAX_VALUE - 1 || mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; @@ -101,17 +131,20 @@ public class GT_MetaTileEntity_Replicator return GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (ItemList.Cell_Empty.isStackEqual(aStack)); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && ItemList.Cell_Empty.isStackEqual(aStack); } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return aFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)); } + @Override public int getCapacity() { if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) { - sHeaviestElementMass = Materials.getMaterialsMap().values().stream().mapToInt(material -> (int) cubicFluidMultiplier((int)material.getMass())).max().orElseThrow(NoSuchElementException::new); + sHeaviestElementMass = Materials.getMaterialsMap().values().stream().mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())).max().orElseThrow(NoSuchElementException::new); //Make the Number nicer =) sHeaviestElementMass = 1000 * (sHeaviestElementMass / 1000 + 1); } 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 eacaf1703d..a07af88917 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,22 +2,46 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; +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 { +import static gregtech.api.enums.Textures.BlockIcons.*; + +public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)}); + super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), + 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.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + 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.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), + 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) { @@ -28,18 +52,22 @@ public class GT_MetaTileEntity_RockBreaker 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); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); } + @Override public int checkRecipe() { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { @@ -52,7 +80,7 @@ public class GT_MetaTileEntity_RockBreaker if (tOutput != null) { if (GT_Utility.areStacksEqual(getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { tOutput = new ItemStack(Blocks.obsidian, 1); - if (canOutput(new ItemStack[]{tOutput})) { + if (canOutput(tOutput)) { getInputAt(0).stackSize -= 1; calculateOverclockedNess(32,128); //In case recipe is too OP for that machine @@ -61,7 +89,7 @@ public class GT_MetaTileEntity_RockBreaker this.mOutputItems[0] = tOutput; return 2; } - } else if (canOutput(new ItemStack[]{tOutput})) { + } else if (canOutput(tOutput)) { calculateOverclockedNess(32,16); //In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 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 1d627e3878..11430c6862 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 @@ -9,13 +9,12 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Assemblyline_Server; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; @@ -29,13 +28,37 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; +import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; -public class GT_MetaTileEntity_Scanner - extends GT_MetaTileEntity_BasicMachine { - +public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { + public GT_MetaTileEntity_Scanner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Scans Crops and other things.", 1, 1, "Scanner.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER)}); + super(aID, aName, aNameRegional, aTier, 1, "Scans Crops and other things.", 1, 1, "Scanner.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_SCANNER), + TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_SCANNER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_SCANNER), + TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_SCANNER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_GLOW).glow().build())); } public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -46,10 +69,12 @@ public class GT_MetaTileEntity_Scanner 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); } + @Override public int checkRecipe() { ItemStack aStack = getInputAt(0); if (getOutputAt(0) != null) { @@ -57,14 +82,14 @@ public class GT_MetaTileEntity_Scanner } else if ((GT_Utility.isStackValid(aStack)) && (aStack.stackSize > 0)) { if ((getFillableStack() != null) && (getFillableStack().containsFluid(Materials.Honey.getFluid(100L)))) { try { - Object tIndividual = AlleleManager.alleleRegistry.getIndividual(aStack); + IIndividual tIndividual = AlleleManager.alleleRegistry.getIndividual(aStack); if (tIndividual != null) { - if (((IIndividual) tIndividual).analyze()) { + if (tIndividual.analyze()) { getFillableStack().amount -= 100; - this.mOutputItems[0] = GT_Utility.copy(new Object[]{aStack}); + this.mOutputItems[0] = GT_Utility.copy(aStack); aStack.stackSize = 0; NBTTagCompound tNBT = new NBTTagCompound(); - ((IIndividual) tIndividual).writeToNBT(tNBT); + tIndividual.writeToNBT(tNBT); this.mOutputItems[0].setTagCompound(tNBT); calculateOverclockedNess(2, 500); //In case recipe is too OP for that machine @@ -72,7 +97,7 @@ public class GT_MetaTileEntity_Scanner return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; } - this.mOutputItems[0] = GT_Utility.copy(new Object[]{aStack}); + this.mOutputItems[0] = GT_Utility.copy(aStack); aStack.stackSize = 0; this.mMaxProgresstime = 1; this.mEUt = 1; @@ -100,14 +125,14 @@ public class GT_MetaTileEntity_Scanner this.mEUt = 1; } aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{aStack}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, aStack); this.mOutputItems[0].setTagCompound(tNBT); return 2; } if (ItemList.Tool_DataOrb.isStackEqual(getSpecialSlot(), false, true)) { if (ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) { aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); calculateOverclockedNess(30, 512); //In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) @@ -119,7 +144,7 @@ public class GT_MetaTileEntity_Scanner getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; - this.mOutputItems[0] = ItemList.Tool_DataOrb.get(1L, new Object[0]); + this.mOutputItems[0] = ItemList.Tool_DataOrb.get(1L); Behaviour_DataOrb.setDataTitle(this.mOutputItems[0], "Elemental-Scan"); Behaviour_DataOrb.setDataName(this.mOutputItems[0], tData.mMaterial.mMaterial.mElement.name()); calculateOverclockedNess(30, GT_Utility.safeInt(tData.mMaterial.mMaterial.getMass() * 8192L)); @@ -132,7 +157,7 @@ public class GT_MetaTileEntity_Scanner if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)) { if (ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) { aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); calculateOverclockedNess(30, 128); //In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) @@ -143,7 +168,7 @@ public class GT_MetaTileEntity_Scanner getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); this.mOutputItems[0].setTagCompound(aStack.getTagCompound()); calculateOverclockedNess(30, 128); //In case recipe is too OP for that machine @@ -155,7 +180,7 @@ public class GT_MetaTileEntity_Scanner getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); 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 @@ -189,7 +214,7 @@ public class GT_MetaTileEntity_Scanner getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort(new NBTTagCompound(), "rocket_tier", Short.parseShort(sTier))); calculateOverclockedNess(480, 36000); @@ -206,7 +231,7 @@ public class GT_MetaTileEntity_Scanner GT_Utility.ItemNBT.convertProspectionData(aStack); aStack.stackSize -= 1; - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{aStack}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, aStack); calculateOverclockedNess(30, 1000); //In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) @@ -218,14 +243,14 @@ public class GT_MetaTileEntity_Scanner if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true) && aStack != null) { for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)) { - boolean failScanner=true; - for(GT_Recipe scannerRecipe:sScannerFakeRecipes.mRecipeList){ - if(GT_Utility.areStacksEqual(scannerRecipe.mInputs[0],aStack,true)){ - failScanner=false; + boolean failScanner = true; + for (GT_Recipe scannerRecipe : sScannerFakeRecipes.mRecipeList) { + if (GT_Utility.areStacksEqual(scannerRecipe.mInputs[0], aStack, true)) { + failScanner = false; break; } } - if(failScanner){ + if (failScanner) { return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } @@ -235,7 +260,7 @@ public class GT_MetaTileEntity_Scanner if (s == null) s = tRecipe.mOutput.getDisplayName(); } - this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()}); + this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); //remove possible old NBTTagCompound this.mOutputItems[0].setTagCompound(new NBTTagCompound()); GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], s + " Construction Data"); @@ -285,7 +310,7 @@ public class GT_MetaTileEntity_Scanner } - tBuilder.append((count == 0 ? "" : "\nOr ") + tStack.stackSize + " " + s); + tBuilder.append(count == 0 ? "" : "\nOr ").append(tStack.stackSize).append(" ").append(s); count++; } } @@ -334,32 +359,37 @@ public class GT_MetaTileEntity_Scanner public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (mProgresstime >= (mMaxProgresstime - 1)) { if ((this.mOutputItems[0] != null) && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) { - GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); + GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); } } super.onPostTick(aBaseMetaTileEntity, aTick); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return sScannerFakeRecipes; } + @Override public int getCapacity() { return 1000; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } 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 3c5dffeb9f..42c8db6722 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 @@ -3,13 +3,12 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_UndergroundOil; @@ -27,12 +26,40 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_BasicMachine { boolean ready = false; public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)}); + super(aID, aName, aNameRegional, aTier, 1, + "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", 1, 1, + "Default.png", "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build())); } public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -43,6 +70,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic 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); } 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 c9dbded8f9..7d6c0a29ed 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -1,12 +1,11 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Teleporter; @@ -18,7 +17,14 @@ import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.EntityDragonPart; import net.minecraft.entity.effect.EntityWeatherEffect; -import net.minecraft.entity.item.*; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.item.EntityEnderCrystal; +import net.minecraft.entity.item.EntityEnderEye; +import net.minecraft.entity.item.EntityFireworkRocket; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.entity.item.EntityTNTPrimed; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -37,6 +43,13 @@ import net.minecraftforge.fluids.FluidStack; import java.util.List; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES_GLOW; public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @@ -171,6 +184,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } + @Override public String[] getInfoData() { return new String[]{ "Coordinates:", @@ -185,9 +199,21 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @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 != this.getBaseMetaTileEntity().getFrontFacing()) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES) : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)}; + 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()}; } + @Override public void saveNBTData(NBTTagCompound aNBT) { if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); aNBT.setInteger("mTargetX", this.mTargetX); @@ -197,6 +223,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { aNBT.setBoolean("mDebug", this.mDebug); } + @Override public void loadNBTData(NBTTagCompound aNBT) { mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); this.mTargetX = aNBT.getInteger("mTargetX"); @@ -206,6 +233,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { this.mDebug = aNBT.getBoolean("mDebug"); } + @Override public void onConfigLoad(GT_Config aConfig) { sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); sPassiveEnergyDrain = aConfig.get(ConfigCategories.machineconfig, "Teleporter.PassiveDrain", sPassiveEnergyDrain); @@ -287,7 +315,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { tTile = tWorld.getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ); } } - if (tTile != null && tTile instanceof IInventory) { + if (tTile instanceof IInventory) { int tStacksize = mInventory[0].stackSize; GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) { 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 new file mode 100644 index 0000000000..2fa860bb20 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java @@ -0,0 +1,253 @@ +/** + * + * Inspired/ported from GregTech 6 under the LGPL license + * + * Copyright (c) 2020 GregTech-6 Team + * + * 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 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/>. + */ + +package gregtech.common.tileentities.machines.long_distance; + +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 net.minecraft.block.Block; +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.ChunkCoordinates; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Queue; + +public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_MetaTileEntity_BasicHull_NonElectric { + protected GT_MetaTileEntity_LongDistancePipelineBase mTarget = null, mSender = null; + protected ChunkCoordinates mTargetPos = null; + + 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) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + if (mTargetPos != null && mTarget != this) { + aNBT.setBoolean("target", true); + aNBT.setInteger("target.x", mTargetPos.posX); + aNBT.setInteger("target.y", mTargetPos.posY); + aNBT.setInteger("target.z", mTargetPos.posZ); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + if (aNBT.hasKey("target")) { + mTargetPos = new ChunkCoordinates( + aNBT.getInteger("target.x"), + aNBT.getInteger("target.y"), + aNBT.getInteger("target.z") + ); + } + } + + public boolean isSameClass(GT_MetaTileEntity_LongDistancePipelineBase other) { + return false; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem != null) { + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) { + scanPipes(); + return true; + } + } + return false; + } + + public boolean isDead() { + return getBaseMetaTileEntity() == null || getBaseMetaTileEntity().isDead(); + } + + public boolean checkTarget() { + final IGregTechTileEntity gt_tile = getBaseMetaTileEntity(); + if (gt_tile == null || !gt_tile.isAllowedToWork() || gt_tile.isClientSide()) return false; + World world = gt_tile.getWorld(); + + if (mTargetPos == null) { + // 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 + 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) && + isSameClass((GT_MetaTileEntity_LongDistancePipelineBase)tMeta)) + { + // It's the right type! + mTarget = (GT_MetaTileEntity_LongDistancePipelineBase)tMeta; + } + else if (te != null) { + // It isn't the right type, kill the target position + mTargetPos = null; + } + } + } + if (mTarget == null || mTarget == this) return false; + if (mTarget.mSender == null || mTarget.mSender.isDead() || mTarget.mSender.mTarget == null || mTarget.mSender.mTarget.isDead()) mTarget.mSender = this; + + return mTarget.mSender == this; + } + + @Override + 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)); + } 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 + )); + } + + return aList; + + } + + // What meta should the pipes for this pipeline have + public abstract int getPipeMeta(); + + protected void scanPipes() { + if (mSender != null && !mSender.isDead() && mSender.mTarget == this) return; + + // Check if we need to scan anything + final IGregTechTileEntity gtTile = getBaseMetaTileEntity(); + if (gtTile == null) return; + + final World world = gtTile.getWorld(); + if (world == null) return; + + mTargetPos = getCoords(); + mTarget = this; + mSender = null; + + // Start scanning from the output side + Block aBlock = gtTile.getBlockAtSide(gtTile.getBackFacing()); + + if(aBlock instanceof GT_Block_LongDistancePipe) { + byte aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); + if (aMetaData != getPipeMeta()) return; + + HashSet<ChunkCoordinates> + tVisited = new HashSet<>(Collections.singletonList(getCoords())), + tWires = new HashSet<>(); + Queue<ChunkCoordinates> + tQueue = new LinkedList<>(Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); + + while (!tQueue.isEmpty()) { + final ChunkCoordinates aCoords = tQueue.poll(); + + if(world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ) == aBlock && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { + // We've got another pipe/wire block + // TODO: Make sure it's the right type of pipe/wire via meta + ChunkCoordinates tCoords; + tWires.add(aCoords); + + // For each direction, if we haven't already visisted that coordinate, add it to the end of the queue + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) tQueue.add(tCoords); + } else { + // It's not a block - let's see if it's a tile entity + TileEntity tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); + if ( + tTileEntity != gtTile && tTileEntity instanceof BaseMetaTileEntity && + ((BaseMetaTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) + { + final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase)((BaseMetaTileEntity) tTileEntity).getMetaTileEntity(); + if (isSameClass(tGtTile) && tWires.contains( + tGtTile.getFacingOffset((BaseMetaTileEntity)tTileEntity, ((BaseMetaTileEntity) tTileEntity).getFrontFacing()) + )) { + // If it's the same class, and we've scanned a wire in front of it (the input side), we've found our target + mTarget = tGtTile; + mTargetPos = tGtTile.getCoords(); + return; + } + + // Remove this block from the visited because we might end up back here from another wire that IS connected to the + // input side + tVisited.remove(aCoords); + } + } + } + } + + } + + 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) + ); + + } + + public ChunkCoordinates getCoords() { + final IGregTechTileEntity gt_tile = getBaseMetaTileEntity(); + return new ChunkCoordinates(gt_tile.getXCoord(), gt_tile.getYCoord(), gt_tile.getZCoord()); + } + + @Override + public void onMachineBlockUpdate() { + //GT_Mod.GT_FML_LOGGER.info("You're dead to me"); + mTargetPos = null; mSender = null; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public boolean shouldTriggerBlockUpdate() { return true; } + +} 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 new file mode 100644 index 0000000000..2c8ac45719 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java @@ -0,0 +1,123 @@ +/** + * + * Inspired/ported from GregTech 6 under the LGPL license + * + * Copyright (c) 2020 GregTech-6 Team + * + * 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 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/>. + */ + +package gregtech.common.tileentities.machines.long_distance; + +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 static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_BACK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE_GLOW; + +public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEntity_LongDistancePipelineBase { + static final FluidTankInfo[] emptyTank = {new FluidTankInfo(null, Integer.MAX_VALUE)}; + + 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) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public boolean isSameClass(GT_MetaTileEntity_LongDistancePipelineBase other) { + return other instanceof GT_MetaTileEntity_LongDistancePipelineFluid; + } + + @Override + public int getPipeMeta() { + return 0; + } + + public IFluidHandler getTank() { + final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); + TileEntity tankTile = tTile.getTileEntityAtSide(tTile.getBackFacing()); + if (tankTile instanceof IFluidHandler) return (IFluidHandler)tankTile; + else return null; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + if (checkTarget()) { + final IFluidHandler tankTile = getTank(); + if (tankTile != null) return tankTile.getTankInfo(aSide); + + } + + return emptyTank; + } + @Override + public int fill(ForgeDirection aSide, FluidStack aFluid, boolean aDoFill) { + if (checkTarget()) { + final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); + final IFluidHandler tankTile = getTank(); + if (tankTile != null) return tankTile.fill(ForgeDirection.getOrientation(tTile.getFrontFacing()), aFluid, aDoFill); + } + return 0; + } + @Override + public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean aDoDrain) { + return null; + } + @Override + public FluidStack drain(ForgeDirection aSide, int aMaxDrain, boolean aDoDrain) { + return null; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LongDistancePipelineFluid(mName, mTier, getDescription()[0], mTextures); + } + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + 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()}; + } +} 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 new file mode 100644 index 0000000000..f52725ef90 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java @@ -0,0 +1,196 @@ +/** + * + * Inspired/ported from GregTech 6 under the LGPL license + * + * Copyright (c) 2020 GregTech-6 Team + * + * 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 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/>. + */ + +package gregtech.common.tileentities.machines.long_distance; + +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; + +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_BACK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE_GLOW; + +public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntity_LongDistancePipelineBase { + static final int[] emptyIntArray = new int[0]; + + 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) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public boolean isSameClass(GT_MetaTileEntity_LongDistancePipelineBase other) { + return other instanceof GT_MetaTileEntity_LongDistancePipelineItem; + } + + @Override + public int getPipeMeta() { + return 1; + } + + public IInventory getInventory() { + final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); + TileEntity invTile = tTile.getTileEntityAtSide(tTile.getBackFacing()); + if (invTile instanceof IInventory) return (IInventory)invTile; + else return null; + } + + @Override + public ItemStack decrStackSize(int aSlot, int aDecrement) { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.decrStackSize(aSlot, aDecrement); + } + return null; + } + @Override + public ItemStack getStackInSlotOnClosing(int aSlot) { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.getStackInSlotOnClosing(aSlot); + } + return null; + } + @Override + public ItemStack getStackInSlot(int aSlot) { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.getStackInSlot(aSlot); + } + return null; + } + @Override + public String getInventoryName() { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.getInventoryName(); + } + return super.getInventoryName(); + } + @Override + public int getSizeInventory() { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.getSizeInventory(); + } + return 0; + } + @Override + public int getInventoryStackLimit() { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.getInventoryStackLimit(); + } + return 0; + } + @Override + public void setInventorySlotContents(int aSlot, ItemStack aStack) { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) iInventory.setInventorySlotContents(aSlot, aStack); + } + } + @Override + public boolean hasCustomInventoryName() { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.hasCustomInventoryName(); + } + return false; + } + @Override + public boolean isItemValidForSlot(int aSlot, ItemStack aStack) { + if (checkTarget()) { + IInventory iInventory = getInventory(); + if (iInventory != null) return iInventory.isItemValidForSlot(aSlot, aStack); + } + return false; + } + +// // Relay Sided Inventories +// + + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + if (checkTarget()) { + final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); + IInventory iInventory = getInventory(); + if (iInventory instanceof ISidedInventory) return ((ISidedInventory)iInventory).getAccessibleSlotsFromSide(tTile.getBackFacing()); + if (iInventory != null) { + int[] tReturn = new int[iInventory.getSizeInventory()]; + for (int i = 0; i < tReturn.length; i++) tReturn[i] = i; + return tReturn; + } + } + + return emptyIntArray; + } + + @Override + public boolean canInsertItem(int aSlot, ItemStack aStack, int aSide) { + if (checkTarget()) { + final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); + IInventory iInventory = getInventory(); + if (iInventory instanceof ISidedInventory) return ((ISidedInventory)iInventory).canInsertItem(aSlot, aStack, tTile.getBackFacing()); + return iInventory != null; + } + return false; + } + + @Override + public boolean canExtractItem(int aSlot, ItemStack aStack, int aSide) { + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LongDistancePipelineItem(mName, mTier, getDescription()[0], mTextures); + } + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + 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()}; + } +} 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 new file mode 100644 index 0000000000..1ac4df6d73 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java @@ -0,0 +1,98 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.interfaces.IHeatingCoil; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +public abstract class GT_MetaTileEntity_AbstractMultiFurnace extends GT_MetaTileEntity_MultiBlockBase { + + private static final int CASING_INDEX = 11; + + protected GT_MetaTileEntity_AbstractMultiFurnace(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + protected GT_MetaTileEntity_AbstractMultiFurnace(String aName) { + super(aName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + protected HeatingCoilLevel getInitialHeatLevel(IGregTechTileEntity aBaseMetaTileEntity, int xDir, int zDir) { + Block coil = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 1, zDir); + if (!(coil instanceof IHeatingCoil)) + return null; + IHeatingCoil heatingCoil = (IHeatingCoil) coil; + byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir); + return heatingCoil.getCoilHeat(tUsedMeta); + } + + protected boolean checkStructure(HeatingCoilLevel heatingCap, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity){ + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (!checkTopLayer(i, j, xDir, zDir, aBaseMetaTileEntity)) + return false; + + if (!checkBottomLayer(i, j, xDir, zDir, aBaseMetaTileEntity)) + return false; + + if (!checkCoils(heatingCap, i, j, xDir, zDir, aBaseMetaTileEntity)) + return false; + } + } + return true; + } + + protected abstract boolean checkTopLayer(int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity); + protected abstract boolean checkCoils(HeatingCoilLevel heatingCap, int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity); + + protected boolean checkBottomLayer(int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity){ + if ((xDir + i == 0) && (zDir + j == 0)) + return true; + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); + if (addMaintenanceToMachineList(tTileEntity, CASING_INDEX)) + return true; + if (addInputToMachineList(tTileEntity, CASING_INDEX)) + return true; + if (addOutputToMachineList(tTileEntity, CASING_INDEX)) + return true; + if (addEnergyInputToMachineList(tTileEntity, CASING_INDEX)) + return true; + + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings1) + return false; + return aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) == CASING_INDEX; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 20; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } +} 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 c90df2a7a7..6695c4d0a2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -1,13 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -15,7 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -24,8 +21,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW; public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_MultiBlockBase { @@ -40,140 +44,157 @@ public class GT_MetaTileEntity_AssemblyLine super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AssemblyLine(this.mName); } + @Override public String[] getDescription() { - 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, 15, 4, 4, 3, 3, false)//? - .addStructureInfo("From Bottom to Top, Left to Right") - .addStructureInfo("Layer 1 - Solid Steel Machine Casing, Input Bus (last is Output Bus), Solid Steel Machine Casing") - .addStructureInfo("Layer 2 - Reinforced Glass, Assembling Line Casing, Reinforced Glass") - .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing") - .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty") - .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes, aside from the last") - .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller") - .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller")//TT - - .addController("Either Grate on layer 3 of the first slice") - .addEnergyHatch("Any layer 4 casing") - .addMaintenanceHatch("Any layer 1 casing") - .addInputBus("As specified on layer 1") - .addInputHatch("Any layer 1 casing") - .addOutputBus("Replaces Input Bus on final slice") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + 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, 15, 4, 4, 3, 3, false)//? + .addStructureInfo("From Bottom to Top, Left to Right") + .addStructureInfo("Layer 1 - Solid Steel Machine Casing, Input Bus (last is Output Bus), Solid Steel Machine Casing") + .addStructureInfo("Layer 2 - Reinforced Glass, Assembling Line Casing, Reinforced Glass") + .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing") + .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty") + .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes, aside from the last") + .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller") + .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller")//TT + + .addController("Either Grate on layer 3 of the first slice") + .addEnergyHatch("Any layer 4 casing") + .addMaintenanceHatch("Any layer 1 casing") + .addInputBus("As specified on layer 1") + .addInputHatch("Any layer 1 casing") + .addOutputBus("Replaces Input Bus on final slice") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)}; + if (aActive) + return new ITexture[]{ + BlockIcons.casingTexturePages[0][16], + TextureFactory.of(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.casingTexturePages[0][16], + TextureFactory.of(OVERLAY_FRONT_ASSEMBLY_LINE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return null; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { - if(GT_Values.D1) + if (GT_Values.D1) GT_FML_LOGGER.info("Start ALine recipe check"); ArrayList<ItemStack> tDataStickList = getDataItems(2); - if (tDataStickList.size() == 0) return false; - if(GT_Values.D1) - GT_FML_LOGGER.info("Stick accepted, " + tDataStickList.size() + " Data Sticks found"); + if (tDataStickList.isEmpty()) return false; + if (GT_Values.D1) + GT_FML_LOGGER.info("Stick accepted, " + tDataStickList.size() + " Data Sticks found"); - ItemStack tStack[] = new ItemStack[15]; + ItemStack[] tStack = new ItemStack[15]; FluidStack[] tFluids = new FluidStack[4]; boolean findRecipe = false; - nextDS:for (ItemStack tDataStick : tDataStickList){ + nextDS: + for (ItemStack tDataStick : tDataStickList) { NBTTagCompound tTag = tDataStick.getTagCompound(); if (tTag == null) continue; for (int i = 0; i < 15; i++) { - int count = tTag.getInteger("a"+i); + int count = tTag.getInteger("a" + i); if (!tTag.hasKey("" + i) && count <= 0) continue; if (mInputBusses.get(i) == null) { continue nextDS; } - + ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0); boolean flag = true; if (count > 0) { - for (int j = 0; j < count; j++) { - tStack[i] = GT_Utility.loadItem(tTag, "a" + i + ":" + j); - if (tStack[i] == null) continue; - if(GT_Values.D1) - GT_FML_LOGGER.info("Item "+i+" : "+tStack[i].getUnlocalizedName()); - if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { - flag = false; - break; - } - } - } + for (int j = 0; j < count; j++) { + tStack[i] = GT_Utility.loadItem(tTag, "a" + i + ":" + j); + if (tStack[i] == null) continue; + if (GT_Values.D1) + GT_FML_LOGGER.info("Item " + i + " : " + tStack[i].getUnlocalizedName()); + if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { + flag = false; + break; + } + } + } if (flag) { - tStack[i] = GT_Utility.loadItem(tTag, "" + i); - if (tStack[i] == null) { - flag = false; - continue; - } - if(GT_Values.D1) - GT_FML_LOGGER.info("Item "+i+" : "+tStack[i].getUnlocalizedName()); - if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { - flag = false; - } - } - if(GT_Values.D1) + tStack[i] = GT_Utility.loadItem(tTag, "" + i); + if (tStack[i] == null) { + flag = false; + continue; + } + if (GT_Values.D1) + GT_FML_LOGGER.info("Item " + i + " : " + tStack[i].getUnlocalizedName()); + if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { + flag = false; + } + } + if (GT_Values.D1) GT_FML_LOGGER.info(i + (flag ? " not accepted" : " accepted")); if (flag) continue nextDS; } - if(GT_Values.D1)GT_FML_LOGGER.info("All Items done, start fluid check"); + if (GT_Values.D1) GT_FML_LOGGER.info("All Items done, start fluid check"); for (int i = 0; i < 4; i++) { if (!tTag.hasKey("f" + i)) continue; tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i); if (tFluids[i] == null) continue; - if(GT_Values.D1) - GT_FML_LOGGER.info("Fluid "+i+" "+tFluids[i].getUnlocalizedName()); + if (GT_Values.D1) + GT_FML_LOGGER.info("Fluid " + i + " " + tFluids[i].getUnlocalizedName()); if (mInputHatches.get(i) == null) { continue nextDS; } FluidStack fluidInHatch = mInputHatches.get(i).mFluid; - if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) { - if(GT_Values.D1) - GT_FML_LOGGER.info(i+" not accepted"); + if (!GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) { + if (GT_Values.D1) + GT_FML_LOGGER.info(i + " not accepted"); continue nextDS; } - if(GT_Values.D1) - GT_FML_LOGGER.info(i+" accepted"); + if (GT_Values.D1) + GT_FML_LOGGER.info(i + " accepted"); } - if(GT_Values.D1) + if (GT_Values.D1) GT_FML_LOGGER.info("Input accepted, check other values"); if (!tTag.hasKey("output")) continue; @@ -191,13 +212,13 @@ public class GT_MetaTileEntity_AssemblyLine continue; mEUt = tTag.getInteger("eu"); - if(GT_Values.D1)GT_FML_LOGGER.info("Find avaiable recipe"); - findRecipe = true; + if (GT_Values.D1) GT_FML_LOGGER.info("Find avaiable recipe"); + findRecipe = true; break; } if (!findRecipe) return false; - if(GT_Values.D1)GT_FML_LOGGER.info("All checked start consuming inputs"); + if (GT_Values.D1) GT_FML_LOGGER.info("All checked start consuming inputs"); for (int i = 0; i < 15; i++) { if (tStack[i] == null) continue; @@ -213,7 +234,7 @@ public class GT_MetaTileEntity_AssemblyLine mInputHatches.get(i).mFluid = null; } } - if(GT_Values.D1)GT_FML_LOGGER.info("Check overclock"); + if (GT_Values.D1) GT_FML_LOGGER.info("Check overclock"); byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); @@ -232,7 +253,7 @@ public class GT_MetaTileEntity_AssemblyLine } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); updateSlots(); - if(GT_Values.D1) + if (GT_Values.D1) GT_FML_LOGGER.info("Recipe sucessfull"); return true; } @@ -245,6 +266,7 @@ public class GT_MetaTileEntity_AssemblyLine return super.onRunningTick(aStack); } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 20) { @@ -252,7 +274,9 @@ public class GT_MetaTileEntity_AssemblyLine } } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mDataAccessHatches.clear(); int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; if (xDir != 0) { @@ -312,7 +336,7 @@ public class GT_MetaTileEntity_AssemblyLine } tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i); if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) { - return r > 0 && mEnergyHatches.size() > 0; + return r > 0 && !mEnergyHatches.isEmpty(); } } } else { @@ -372,7 +396,7 @@ public class GT_MetaTileEntity_AssemblyLine } tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir); if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) { - return r > 0 && mEnergyHatches.size() > 0; + return r > 0 && !mEnergyHatches.isEmpty(); } } } @@ -385,15 +409,14 @@ public class GT_MetaTileEntity_AssemblyLine private boolean isCorrectDataItem(ItemStack aStack, int state){ if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true; if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true; - if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true; - return false; + return (state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); } /** * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb */ public ArrayList<ItemStack> getDataItems(int state) { - ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); + ArrayList<ItemStack> rList = new ArrayList<>(); if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) { rList.add(mInventory[1]); } @@ -420,19 +443,23 @@ public class GT_MetaTileEntity_AssemblyLine return false; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } -}
\ No newline at end of file +} 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 eb1ce1348f..446965f3b6 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,20 +1,23 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; +import org.lwjgl.input.Keyboard; -public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace{ - private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)}; - private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)}; - private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE)}; +public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace { + private static final ITexture[] FACING_SIDE = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)}; + private static final ITexture[] FACING_FRONT = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)}; + private static final ITexture[] FACING_ACTIVE = { + TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), + TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build() + }; public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -23,33 +26,31 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri public GT_MetaTileEntity_BrickedBlastFurnace(String aName) { super(aName); } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BrickedBlastFurnace(this.mName); - } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.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(200) - .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"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } -} + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.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(200) + .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"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } + } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; @@ -57,18 +58,24 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri return FACING_SIDE; } - @Override - protected boolean isCorrectCasingBlock(Block block) { - return block == GregTech_API.sBlockCasings4; - } + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BrickedBlastFurnace(this.mName); + } + + @Override + protected boolean isCorrectCasingBlock(Block block) { + return block == GregTech_API.sBlockCasings4; + } - @Override - protected boolean isCorrectCasingMetaID(int metaID) { - return metaID == 15; - } + @Override + protected boolean isCorrectCasingMetaID(int metaID) { + return metaID == 15; + } - @Override - public String getName() { - return "Bricked Blast Furnace"; - } + @Override + public String getName() { + return "Bricked Blast Furnace"; + } } + diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index af388a790d..93b36d376c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -1,18 +1,24 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; -public class GT_MetaTileEntity_BronzeBlastFurnace - extends GT_MetaTileEntity_PrimitiveBlastFurnace { - private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS)}; - private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE)}; - private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE)}; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS; + +public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace { + private static final ITexture[] FACING_SIDE = {TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS)}; + private static final ITexture[] FACING_FRONT = {TextureFactory.of(MACHINE_BRONZEBLASTFURNACE)}; + private static final ITexture[] FACING_ACTIVE = { + TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE), + TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build() + }; public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -22,20 +28,12 @@ public class GT_MetaTileEntity_BronzeBlastFurnace super(aName); } - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BronzeBlastFurnace(this.mName); - } - + @Override public String[] getDescription() { - return new String[]{"Disabled"}; - /*return new String[]{ - "Controller Block for the Bronze Blast Furnace", - "Useable for Steel and general Pyrometallurgy", - "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", - "Built from 32 Bronze Plated Bricks", - "Causes 200 Pollution per second"};*/ + return new String[]{"Disabled"}; } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; @@ -44,6 +42,11 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BronzeBlastFurnace(this.mName); + } + + @Override protected boolean isCorrectCasingBlock(Block block) { return block == GregTech_API.sBlockCasings1; } @@ -57,6 +60,4 @@ public class GT_MetaTileEntity_BronzeBlastFurnace public String getName() { return "Bronze Blast Furnace"; } - - -}
\ No newline at end of file +} 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 8459f5e84b..058d5f3487 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -1,17 +1,12 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.common.GT_Pollution; @@ -22,11 +17,19 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.ChunkPosition; import net.minecraftforge.oredict.OreDictionary; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlockBase { private boolean running = false; - private boolean p1, p2, p3, p4, p5, p6; public GT_MetaTileEntity_Charcoal_Pit(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -36,77 +39,42 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock super(aName); } - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Charcoal_Pit(this.mName); - } - - public String[] getDescription() { - 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(100) - .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"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == 1) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][10], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][10]}; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; } @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - - return true; + // No GUI, do not capture right-click so it does not interfere when placing logs + return false; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - + @Override public boolean checkRecipe(ItemStack aStack) { if (!checkRecursiveBlocks()) { - this.mEfficiency = 0; - this.mEfficiencyIncrease = 0; - this.mMaxProgresstime = 0; + mEfficiency = 0; + mEfficiencyIncrease = 0; + mMaxProgresstime = 0; running = false; return false; } if (mEfficiency == 0) { - this.mEfficiency = 10000; - this.mEfficiencyIncrease = 10000; - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime*10); + mEfficiency = 10000; + mEfficiencyIncrease = 10000; + mMaxProgresstime = Math.max(1, mMaxProgresstime); + GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime * 10); return true; } else { - this.mEfficiency = 0; - this.mEfficiencyIncrease = 0; - this.mMaxProgresstime = 0; + mEfficiency = 0; + mEfficiencyIncrease = 0; + mMaxProgresstime = 0; } return false; } @@ -115,12 +83,10 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock ArrayList<ChunkPosition> tList1 = new ArrayList<>(); ArrayList<ChunkPosition> tList2 = new ArrayList<>(); - Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(0, -1, 0); - if (!isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(0, -1, 0))) { - return false; - } else { + Block tBlock = getBaseMetaTileEntity().getBlockOffset(0, -1, 0); + if (isWoodLog(tBlock, getBaseMetaTileEntity().getMetaIDOffset(0, -1, 0))) { tList2.add(new ChunkPosition(0, -1, 0)); - } + } else return false; while (!tList2.isEmpty()) { ChunkPosition tPos = tList2.get(0); tList2.remove(0); @@ -130,91 +96,93 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock } if (running) { for (ChunkPosition tPos : tList1) { - if (isWoodLog(this.getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ), this.getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ))) - this.getBaseMetaTileEntity().getWorld().setBlock(this.getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, this.getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, this.getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, GregTech_API.sBlockReinforced, 4, 3); + if (isWoodLog(getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ), getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ))) + getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, GregTech_API.sBlockReinforced, 4, 3); } running = false; return false; } else { - this.mMaxProgresstime = (int) Math.sqrt(tList1.size() * 240000); + mMaxProgresstime = (int) Math.sqrt(tList1.size() * 240000); } running = true; return true; } - private boolean checkAllBlockSides(int aX, int aY, int aZ, ArrayList<ChunkPosition> aList1, ArrayList<ChunkPosition> aList2) { - p1 = false; - p2 = false; - p3 = false; - p4 = false; - p5 = false; - p6 = false; - Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX + 1, aY, aZ); - if (aX + 1 < 6 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX + 1, aY, aZ)))) { + private boolean isWoodLog(Block log, int meta) { + for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) { + if (OreDictionary.getOreName(id).equals("logWood")) + return true; + } + String tTool = log.getHarvestTool(meta); + 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) { + boolean expandToChunkXPos = false; + boolean expandToChunkXNeg = false; + boolean expandToChunkYPos = false; + boolean expandToChunkYNeg = false; + boolean expandToChunkZPos = false; + boolean expandToChunkZNeg = false; + + 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)))) - p1 = true; - } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) { + expandToChunkXPos = true; + } else if (!(blockXPos == Blocks.dirt || blockXPos == Blocks.grass)) { return false; } - tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX - 1, aY, aZ); - if (aX - 1 > -6 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX - 1, aY, aZ)))) { + 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)))) - p2 = true; - } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) { + expandToChunkXNeg = true; + } else if (!(blockXNeg == Blocks.dirt || blockXNeg == Blocks.grass)) { return false; } - tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY + 1, aZ); - if (aY + 1 < 1 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX, aY + 1, aZ)))) { + 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)))) - p3 = true; - } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass || (aX == 0 && aY == -1 && aZ == 0 && tBlock == GregTech_API.sBlockMachines))) { + expandToChunkYPos = true; + } else if (!(blockYPos == Blocks.dirt || blockYPos == Blocks.grass || (aX == 0 && aY == -1 && aZ == 0 && blockYPos == GregTech_API.sBlockMachines))) { return false; } - tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY - 1, aZ); - if (aY - 1 > -6 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX, aY - 1, aZ)))) { + 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)))) - p4 = true; - } else if (tBlock != Blocks.brick_block) { + expandToChunkYNeg = true; + } else if (blockYNeg != Blocks.brick_block) { return false; } - tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ + 1); - if (aZ + 1 < 6 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ + 1)))) { + 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)))) - p5 = true; - } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) { + expandToChunkZPos = true; + } else if (!(blockZPos == Blocks.dirt || blockZPos == Blocks.grass)) { return false; } - tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ - 1); - if (aZ - 1 > -6 && (isWoodLog(tBlock, this.getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ - 1)))) { + 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)))) - p6 = true; - } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) { + expandToChunkZNeg = true; + } else if (!(blockZNeg == Blocks.dirt || blockZNeg == Blocks.grass)) { return false; } aList1.add(new ChunkPosition(aX, aY, aZ)); - if (p1) aList2.add(new ChunkPosition(aX + 1, aY, aZ)); - if (p2) aList2.add(new ChunkPosition(aX - 1, aY, aZ)); - if (p3) aList2.add(new ChunkPosition(aX, aY + 1, aZ)); - if (p4) aList2.add(new ChunkPosition(aX, aY - 1, aZ)); - if (p5) aList2.add(new ChunkPosition(aX, aY, aZ + 1)); - if (p6) aList2.add(new ChunkPosition(aX, aY, aZ - 1)); + if (expandToChunkXPos) aList2.add(new ChunkPosition(aX + 1, aY, aZ)); + if (expandToChunkXNeg) aList2.add(new ChunkPosition(aX - 1, aY, aZ)); + if (expandToChunkYPos) aList2.add(new ChunkPosition(aX, aY + 1, aZ)); + if (expandToChunkYNeg) aList2.add(new ChunkPosition(aX, aY - 1, aZ)); + if (expandToChunkZPos) aList2.add(new ChunkPosition(aX, aY, aZ + 1)); + if (expandToChunkZNeg) aList2.add(new ChunkPosition(aX, aY, aZ - 1)); return true; } - private boolean isWoodLog(Block log, int meta){ - for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) { - if(OreDictionary.getOreName(id).equals("logWood")) - return true; - } - String tTool = log.getHarvestTool(meta); - return OrePrefixes.log.contains(new ItemStack(log, 1,meta)) && ((tTool != null) && (tTool.equals("axe"))) && (log.getMaterial() == Material.wood); - } - + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mWrench = true; mScrewdriver = true; @@ -225,19 +193,72 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock return true; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Charcoal_Pit(mName); + } + + @Override + public String[] getDescription() { + 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(100) + .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"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } + } + + @Override + 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]}; + } } 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 606c63110f..6cf19d6867 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 @@ -2,7 +2,6 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMachineCallback; @@ -10,7 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -18,10 +17,15 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.input.Keyboard; import static gregtech.api.enums.GT_Values.debugCleanroom; - -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.BLOCK_PLASCRETE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_GLOW; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { private int mHeight = -1; @@ -34,288 +38,310 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas super(aName); } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Cleanroom(mName); - } + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Cleanroom(mName); + } - @Override + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Cleanroom") - .addInfo("Controller block for the Cleanroom") - .addInfo("Consumes 40 EU/t when first turned on 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 propotional to the height of empty space within") - .addInfo("Make sure your Energy Hatch matches! ?") - .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 - .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges") - .addEnergyHatch("LV or MV, any casing")//check - .addMaintenanceHatch("Any casing") - .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") - .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") - .addStructureInfo("You can also use Diodes for more power") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Cleanroom") + .addInfo("Controller block for the Cleanroom") + .addInfo("Consumes 40 EU/t when first turned on 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 propotional to the height of empty space within") + .addInfo("Make sure your Energy Hatch matches! ?") + .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 + .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges") + .addEnergyHatch("LV or MV, any casing")//check + .addMaintenanceHatch("Any casing") + .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") + .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") + .addStructureInfo("You can also use Diodes for more power") + .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } - @Override - public boolean checkRecipe(ItemStack aStack) { - mEfficiencyIncrease = 100; - // use the standard overclock mechanism to determine duration and estimate a maximum consumption - calculateOverclockedNessMulti(40, 45 * Math.min(1, mHeight - 1), 1, getMaxInputVoltage()); - // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption. - mEUt /= -10; - return true; - } + @Override + public boolean checkRecipe(ItemStack aStack) { + mEfficiencyIncrease = 100; + // use the standard overclock mechanism to determine duration and estimate a maximum consumption + calculateOverclockedNessMulti(40, 45 * Math.max(1, mHeight - 1), 1, getMaxInputVoltage()); + // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption. + mEUt /= -10; + return true; + } - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int x = 1; - int z = 1; - int y = 1; - int mDoorCount = 0; - int mHullCount = 0; - int mPlascreteCount = 0; - int mGlassCount = 0; - boolean doorState = false; - this.mUpdate = 100; + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int x = 1; + int z = 1; + int y = 1; + int mDoorCount = 0; + int mHullCount = 0; + int mPlascreteCount = 0; + int mGlassCount = 0; + boolean doorState = false; + this.mUpdate = 100; + + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Checking machine" + ); + } + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + x = i; + break; + } else { + if (debugCleanroom) { + GT_Log.out.println("Cleanroom: Unable to detect room X edge?"); + } + return false; + } + } + } + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(0, 0, i); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 0, i); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + z = i; + break; + } else { + if (debugCleanroom) { + GT_Log.out.println("Cleanroom: Unable to detect room Z edge?"); + } + return false; + } + } + } + //detect room square for filters + for (int i = -x + 1; i < x; i++) { + for (int j = -z + 1; j < z; j++) { + if (i == 0 && j == 0) continue; + Block tBlock = aBaseMetaTileEntity.getBlockOffset(j, 0, i); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(j, 0, i); + if (tBlock != GregTech_API.sBlockCasings3 && tMeta != 11) { + return false; + } + } + } - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Checking machine" - ); - } - for (int i = 1; i < 8; i++) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); - if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { - if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { - x = i; - break; - } else { - if (debugCleanroom) { - GT_Log.out.println("Cleanroom: Unable to detect room X edge?"); - } - return false; - } - } - } - for (int i = 1; i < 8; i++) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(0, 0, i); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 0, i); - if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { - if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { - z = i; - break; - } else { - if (debugCleanroom) { - GT_Log.out.println("Cleanroom: Unable to detect room Z edge?"); - } - return false; - } - } - } - for (int i = -1; i > -16; i--) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); - if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { - y = i + 1; - break; - } - } - if (y > -2) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Room not tall enough?" - ); - } - return false; - } - for (int dX = -x; dX <= x; dX++) { - for (int dZ = -z; dZ <= z; dZ++) { - for (int dY = 0; dY >= y; dY--) { - if (dX == -x || dX == x || dY == 0 || dY == y || dZ == -z || dZ == z) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if (dY == 0) { // TOP - if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border - if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Non reinforced block on top edge? tMeta != 2" - ); - } - return false; - } - } else if (dX != 0 || dZ != 0) { // Top Inner exclude center - if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Non reinforced block on top face interior? tMeta != 11" - ); - } - return false; - } - } - } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { - mPlascreteCount++; - } else if (tBlock != null && tBlock.getUnlocalizedName().equals("blockAlloyGlass")){ - ++mGlassCount; - } else { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if ((!this.addMaintenanceToMachineList(tTileEntity, 82)) && (!this.addEnergyInputToMachineList(tTileEntity, 82))) { - if (tBlock instanceof ic2.core.block.BlockIC2Door) { - if ((tMeta & 8) == 0) { - if (Math.abs(dY) < y) //x - side - doorState = (tMeta & 0x5) == 0x4 || (tMeta & 0x5) == 0x1; - else if (Math.abs(dX) < x) //y-side, corners ignored. - doorState = (tMeta & 0x5) == 0x5 || (tMeta & 0x5) == 0x0; - } - mDoorCount++; - } else { - if (tTileEntity == null) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Missing block? Not a tTileEntity" - ); - } - return false; - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Missing block? Not a aMetaTileEntity" - ); - } - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { - mHullCount++; - } else { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Incorrect block?" - ); - } - return false; - } - } - } - } - } - } - } - } - if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { - return false; - } + for (int i = -1; i > -16; i--) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + y = i + 1; + break; + } + } + if (y > -2) { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Room not tall enough?" + ); + } + return false; + } + for (int dX = -x; dX <= x; dX++) { + for (int dZ = -z; dZ <= z; dZ++) { + for (int dY = 0; dY >= y; dY--) { + if (dX == -x || dX == x || dY == 0 || dY == y || dZ == -z || dZ == z) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); + if (dY == 0) { // TOP + if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Non reinforced block on top edge? tMeta != 2" + ); + } + return false; + } + } else if (dX != 0 || dZ != 0) { // Top Inner exclude center + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Non reinforced block on top face interior? tMeta != 11" + ); + } + return false; + } + } + } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { + mPlascreteCount++; + } else if (tBlock != null && tBlock.getUnlocalizedName().equals("blockAlloyGlass")) { + ++mGlassCount; + } else { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!this.addMaintenanceToMachineList(tTileEntity, 82)) && (!this.addEnergyInputToMachineList(tTileEntity, 82))) { + 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; + else if (Math.abs(dX) < x) // on side parallel to x axis + doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7; + // corners ignored + } + mDoorCount++; + } else { + if (tTileEntity == null) { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Missing block? Not a tTileEntity" + ); + } + return false; + } + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Missing block? Not a aMetaTileEntity" + ); + } + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } else { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Incorrect block?" + ); + } + return false; + } + } + } + } + } + } + } + } + if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + return false; + } - setCallbacks(x, y, z, aBaseMetaTileEntity); + setCallbacks(x, y, z, aBaseMetaTileEntity); if (doorState) { - this.mEfficiency = Math.max(0, this.mEfficiency - 200); + this.mEfficiency = Math.max(0, this.mEfficiency - 200); } - for(byte i = 0 ; i<6 ; i++){ - byte t = (byte) Math.max(1, (byte)(15/(10000f / this.mEfficiency))); - aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t); + for (byte i = 0; i < 6; i++) { + byte t = (byte) Math.max(1, (byte) (15 / (10000f / this.mEfficiency))); + aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t); } - float ratio = (((float)mPlascreteCount)/100f)* GT_Values.cleanroomGlass; + float ratio = (((float) mPlascreteCount) / 100f) * GT_Values.cleanroomGlass; this.mHeight = -y; - return mPlascreteCount>=20 && mGlassCount < (int) Math.floor(ratio); + return mPlascreteCount >= 20 && mGlassCount < (int) Math.floor(ratio); } - 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); + 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); - 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 (iMachineCallback.getType() == this.getClass()) - ((IMachineCallback<GT_MetaTileEntity_Cleanroom>) iMachineCallback).setCallbackBase(this); - } + 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); + } @Override - public boolean allowGeneralRedstoneOutput(){ - return true; + public boolean allowGeneralRedstoneOutput() { + return true; } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == 0 || aSide == 1) { - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; - + 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[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; + return new ITexture[]{TextureFactory.of(BLOCK_PLASCRETE)}; } - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); - } + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); + } - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } - @Override - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } } 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 84bba3b3dd..a509d35ad3 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 @@ -48,4 +48,4 @@ public class GT_MetaTileEntity_ConcreteBackfiller1 extends GT_MetaTileEntity_Con protected int getMinTier() { return 2; } -}
\ No newline at end of file +} 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 ed6c028243..d1f44580c6 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 @@ -81,4 +81,4 @@ public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_Con protected int getMinTier() { return 4; } -}
\ No newline at end of file +} 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 a65f4d0e86..a64fea5ab0 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 @@ -129,4 +129,4 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi return true; } -}
\ No newline at end of file +} 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 f16c9d2d4f..e697208a4a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -1,13 +1,7 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; -import java.util.Collection; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -16,7 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -27,6 +21,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; +import java.util.Collection; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlockBase { protected int fuelConsumption = 0; @@ -42,42 +46,51 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock super(aName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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(20 * getPollutionPerTick(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") - .addMaintenanceHatch("One of the casings next to a Gear Box") - .addMufflerHatch("Top middle back, above the rear Gear Box") - .addInputHatch("Diesel Fuel, next to a Gear Box") - .addInputHatch("Lubricant, next to a Gear Box") - .addInputHatch("Oxygen, optional, next to a Gear Box") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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(20 * getPollutionPerTick(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") + .addMaintenanceHatch("One of the casings next to a Gear Box") + .addMufflerHatch("Top middle back, above the rear Gear Box") + .addInputHatch("Diesel Fuel, next to a Gear Box") + .addInputHatch("Lubricant, next to a Gear Box") + .addInputHatch("Oxygen, optional, next to a Gear Box") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][50], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE)}; + if (aActive) return new ITexture[]{ + casingTexturePages[0][50], + TextureFactory.of(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[0][50], + TextureFactory.of(OVERLAY_FRONT_DIESEL_ENGINE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).glow().build()}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][50]}; + return new ITexture[]{casingTexturePages[0][50]}; } @Override @@ -85,6 +98,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock return getMaxEfficiency(aStack) > 0; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); } @@ -134,7 +148,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock ArrayList<FluidStack> tFluids = getStoredFluids(); Collection<GT_Recipe> tRecipeList = getFuelMap().mRecipeList; - if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel? + if(!tFluids.isEmpty() && tRecipeList != null) { //Does input hatch have a diesel fuel? for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes FluidStack tLiquid; @@ -283,6 +297,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock return 1; } + @Override public int getMaxEfficiency(ItemStack aStack) { return boostEu ? 30000 : 10000; } @@ -315,12 +330,12 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock } } - + return new String[]{ EnumChatFormatting.BLUE+"Diesel Engine"+EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.multiblock.energy")+": " + - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + 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, 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 12ab91d876..e12f36f331 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 @@ -2,13 +2,14 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; @@ -18,13 +19,16 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW; -public class GT_MetaTileEntity_DistillationTower - extends GT_MetaTileEntity_MultiBlockBase { +public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_MultiBlockBase { private static final int CASING_INDEX = 49; private short controllerY; @@ -36,63 +40,79 @@ public class GT_MetaTileEntity_DistillationTower super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_DistillationTower(this.mName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Distillery") - .addInfo("Controller block for the Distillation Tower") - .addInfo("Fluids are only put out at the correct height") - .addInfo("The correct height equals the slot number in the NEI recipe") - .addSeparator() - .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) - .addController("Front bottom") - .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)") - .addEnergyHatch("Any casing") - .addMaintenanceHatch("Any casing") - .addInputHatch("Any bottom layer casing") - .addOutputBus("Any bottom layer casing") - .addOutputHatch("2-11x Output Hatches (One per layer except bottom layer)") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Distillery") + .addInfo("Controller block for the Distillation Tower") + .addInfo("Fluids are only put out at the correct height") + .addInfo("The correct height equals the slot number in the NEI recipe") + .addSeparator() + .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) + .addController("Front bottom") + .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputHatch("Any bottom layer casing") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("2-11x Output Hatches (One per layer except bottom layer)") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)}; + if (aActive) + return new ITexture[]{ + BlockIcons.getCasingTextureForId(CASING_INDEX), + TextureFactory.of(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.getCasingTextureForId(CASING_INDEX), + TextureFactory.of(OVERLAY_FRONT_DISTILLATION_TOWER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sDistillationRecipes; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<FluidStack> tFluidList = getStoredFluids(); for (int i = 0; i < tFluidList.size() - 1; i++) { for (int j = i + 1; j < tFluidList.size(); j++) { - if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) { - if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { tFluidList.remove(j--); } else { tFluidList.remove(i--); @@ -104,27 +124,27 @@ public class GT_MetaTileEntity_DistillationTower long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage)); - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); if (tFluids.length > 0) { - for(int i = 0;i<tFluids.length;i++){ - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{}); - if (tRecipe != null) { - if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + for (FluidStack tFluid : tFluids) { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluid}); + if (tRecipe != null) { + if (tRecipe.isRecipeInputEqual(true, tFluids)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; + this.mOutputFluids = tRecipe.mFluidOutputs.clone(); + updateSlots(); + return true; } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; - this.mOutputFluids = tRecipe.mFluidOutputs.clone(); - updateSlots(); - return true; - } } } } @@ -132,6 +152,7 @@ public class GT_MetaTileEntity_DistillationTower return false; } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { controllerY = aBaseMetaTileEntity.getYCoord(); int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; @@ -190,19 +211,23 @@ public class GT_MetaTileEntity_DistillationTower return casingAmount >= 7 * y - 5 && y >= 3 && y <= 12 && reachedTop; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } @@ -237,4 +262,4 @@ public class GT_MetaTileEntity_DistillationTower } } -}
\ No newline at end of file +} 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 b480f4f5a6..d7b7e2aa4d 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 @@ -3,7 +3,7 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IChunkLoader; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,7 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataA import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; @@ -28,8 +28,13 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; -public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_MultiBlockBase { +public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_MultiBlockBase implements IChunkLoader { 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); @@ -38,7 +43,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu private Block casingBlock; private int casingMeta; private int frameMeta; - private int casingTextureIndex; + protected int casingTextureIndex; protected boolean isPickingPipes; private ForgeDirection back; @@ -72,10 +77,19 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu workState = STATE_DOWNWARD; } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(casingTextureIndex),new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL)}; - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(casingTextureIndex)}; + if (aSide == aFacing) { + if (aActive) return new ITexture[]{ + getCasingTextureForId(casingTextureIndex), + TextureFactory.of(OVERLAY_FRONT_ORE_DRILL_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + getCasingTextureForId(casingTextureIndex), + TextureFactory.of(OVERLAY_FRONT_ORE_DRILL), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).glow().build()}; + } + return new ITexture[]{getCasingTextureForId(casingTextureIndex)}; } @Override @@ -145,7 +159,9 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu /** * Added for compability reasons * @return true if the state is 0 false otherwise. + * @deprecated compatibility reason */ + @Deprecated protected boolean tryLowerPipe() { return tryLowerPipeState(false) == 0; } @@ -168,10 +184,14 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu case 2: return 3; } - if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), xPipe, yHead - 1, zPipe, miningPipeTipBlock, 0, isSimulating)) return 3; + Block b = getBaseMetaTileEntity().getBlock(xPipe, yHead - 1, zPipe); + if (b != miningPipeTipBlock && !GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), xPipe, yHead - 1, zPipe, miningPipeTipBlock, 0, isSimulating)) + return 3; if (!isSimulating) { - if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock); - getBaseMetaTileEntity().decrStackSize(1, 1); + if (yHead != yDrill) + getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock); + if (b != miningPipeBlock && b != miningPipeTipBlock) + getBaseMetaTileEntity().decrStackSize(1, 1); } return 0; @@ -194,7 +214,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu if (pipes.stackSize == maxPipes) break; int needPipes = maxPipes - pipes.stackSize; - int transferPipes = storedItem.stackSize < needPipes ? storedItem.stackSize : needPipes; + int transferPipes = Math.min(storedItem.stackSize, needPipes); pipes.stackSize += transferPipes; storedItem.stackSize -= transferPipes; @@ -233,9 +253,10 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu } /** - * Readded for compability + * @deprecated Readded for compability * @return if no pipes are present */ + @Deprecated protected boolean waitForPipes(){ return !isHasMiningPipes(); } @@ -420,7 +441,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu return config; } - public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>(); + public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<>(); /** * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb @@ -428,15 +449,14 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu private boolean isCorrectDataItem(ItemStack aStack, int state){ if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true; if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true; - if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true; - return false; + return (state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); } /** * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb */ public ArrayList<ItemStack> getDataItems(int state) { - ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); + ArrayList<ItemStack> rList = new ArrayList<>(); if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) { rList.add(mInventory[1]); } @@ -462,4 +482,6 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu } return false; } + @Override + public ChunkCoordIntPair getActiveChunk(){return mCurrentChunk;} } 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 061db80ece..5e99491c2e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -1,42 +1,46 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.VN; - -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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 net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; -public class GT_MetaTileEntity_ElectricBlastFurnace - extends GT_MetaTileEntity_MultiBlockBase { +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; + +public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_AbstractMultiFurnace { private int mHeatingCapacity = 0; private int controllerY; - private FluidStack[] pollutionFluidStacks = new FluidStack[]{Materials.CarbonDioxide.getGas(1000), + private final FluidStack[] pollutionFluidStacks = {Materials.CarbonDioxide.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000)}; + private static final int CASING_INDEX = 11; + public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -45,173 +49,176 @@ public class GT_MetaTileEntity_ElectricBlastFurnace super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ElectricBlastFurnace(this.mName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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 multiplies EU/t by 0.95") - .addInfo("Each 1800K over the min. Heat required allows for one upgraded overclock instead of normal") - .addInfo("Upgraded overclocks reduce recipe time to 25% (instead of 50%) and increase EU/t to 400%") - .addInfo("Additionally gives +100K for every tier past MV") - .addPollutionAmount(20 * getPollutionPerTick(null)) - .addSeparator() - .beginStructureBlock(3, 4, 3, true) - .addController("Front bottom") - .addCasingInfo("Heat Proof Machine Casing", 0) - .addOtherStructurePart("Heating Coils (any tier)", "Two middle Layers") - .addEnergyHatch("Any bottom layer casing") - .addMaintenanceHatch("Any bottom layer casing") - .addMufflerHatch("Top middle") - .addInputBus("Any bottom layer casing") - .addInputHatch("Any bottom layer casing") - .addOutputBus("Any bottom layer casing") - .addOutputHatch("Gasses, Any top layer casing") - .addStructureInfo("Recovery amount scales with Muffler Hatch tier") - .addOutputHatch("Platline fluids, Any bottom layer casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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 multiplies EU/t by 0.95") + .addInfo("Each 1800K over the min. Heat required allows for one upgraded overclock instead of normal") + .addInfo("Upgraded overclocks reduce recipe time to 25% (instead of 50%) and increase EU/t to 400%") + .addInfo("Additionally gives +100K for every tier past MV") + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMaintenanceHatch("Any bottom layer casing") + .addMufflerHatch("Top middle") + .addInputBus("Any bottom layer casing") + .addInputHatch("Any bottom layer casing") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("Gasses, Any top layer casing") + .addStructureInfo("Recovery amount scales with Muffler Hatch tier") + .addOutputHatch("Platline fluids, Any bottom layer casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; + if (aActive) + return new ITexture[]{ + casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).glow().build()}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11]}; + return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sBlastRecipes; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { - ArrayList<ItemStack> tInputList = getStoredInputs(); - int tInputList_sS = tInputList.size(); - for (int i = 0; i < tInputList_sS - 1; i++) { - for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { - if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { - tInputList.remove(j--); - tInputList_sS = tInputList.size(); - } else { - tInputList.remove(i--); - tInputList_sS = tInputList.size(); - break; - } - } - } - } - ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ArrayList<FluidStack> tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } + ItemStack[] tInputs = getCompactedInputs(); + FluidStack[] tFluids = getCompactedFluids(); + + if (tInputs.length <= 0) + return false; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe( + getBaseMetaTileEntity(), + false, + V[tTier], + tFluids, + tInputs + ); + + if (tRecipe == null) + return false; + if (this.mHeatingCapacity < tRecipe.mSpecialValue) + return false; + if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) + return false; + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + int tHeatCapacityDivTiers = (mHeatingCapacity - tRecipe.mSpecialValue) / 900; + byte overclockCount = calculateOverclockednessEBF(tRecipe.mEUt, tRecipe.mDuration, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); } - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - if (tInputList.size() > 0) { - 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, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - int tHeatCapacityDivTiers = (mHeatingCapacity - tRecipe.mSpecialValue)/900; - byte overclockCount=calculateOverclockednessEBF(tRecipe.mEUt, tRecipe.mDuration, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - if(tHeatCapacityDivTiers>0){ - this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); - this.mMaxProgresstime >>=Math.min(tHeatCapacityDivTiers/2,overclockCount);//extra free overclocking if possible - if(this.mMaxProgresstime<1) this.mMaxProgresstime=1;//no eu efficiency correction - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)}; - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; - updateSlots(); - return true; - } + if (tHeatCapacityDivTiers > 0) { + this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); + this.mMaxProgresstime >>= Math.min(tHeatCapacityDivTiers / 2, overclockCount);//extra free overclocking if possible + if (this.mMaxProgresstime < 1) + this.mMaxProgresstime = 1;//no eu efficiency correction } - return false; + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + 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 - * @param aEUt - recipe EUt - * @param aDuration - recipe Duration + * + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration */ protected byte calculateOverclockednessEBF(int aEUt, int aDuration, long maxInputVoltage) { - byte mTier=(byte)Math.max(0,GT_Utility.getTier(maxInputVoltage)), timesOverclocked=0; - if(mTier==0){ + byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)), timesOverclocked = 0; + if (mTier == 0) { //Long time calculation - long xMaxProgresstime = ((long)aDuration)<<1; - if(xMaxProgresstime>Integer.MAX_VALUE-1){ + long xMaxProgresstime = ((long) aDuration) << 1; + if (xMaxProgresstime > Integer.MAX_VALUE - 1) { //make impossible if too long - mEUt=Integer.MAX_VALUE-1; - mMaxProgresstime=Integer.MAX_VALUE-1; - }else{ - mEUt=aEUt>>2; - mMaxProgresstime=(int)xMaxProgresstime; + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = aEUt >> 2; + mMaxProgresstime = (int) xMaxProgresstime; } //return 0; - }else{ + } else { //Long EUt calculation - long xEUt=aEUt; + long xEUt = aEUt; //Isnt too low EUt check? - long tempEUt = xEUt<V[1] ? V[1] : xEUt; + long tempEUt = Math.max(xEUt, V[1]); mMaxProgresstime = aDuration; - while (tempEUt <= V[mTier -1]) { - tempEUt<<=2;//this actually controls overclocking + while (tempEUt <= V[mTier - 1]) { + tempEUt <<= 2;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking - mMaxProgresstime>>=1;//this is effect of overclocking - xEUt = mMaxProgresstime==0 ? xEUt>>1 : xEUt<<2;//U know, if the time is less than 1 tick make the machine use less power + mMaxProgresstime >>= 1;//this is effect of overclocking + xEUt = mMaxProgresstime == 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power timesOverclocked++; } - if(xEUt>Integer.MAX_VALUE-1){ - mEUt = Integer.MAX_VALUE-1; - mMaxProgresstime = Integer.MAX_VALUE-1; - }else{ - mEUt = (int)xEUt; - if(mEUt==0) + if (xEUt > Integer.MAX_VALUE - 1) { + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = (int) xEUt; + if (mEUt == 0) mEUt = 1; - if(mMaxProgresstime==0) + if (mMaxProgresstime == 0) mMaxProgresstime = 1;//set time to 1 tick } } @@ -224,171 +231,136 @@ public class GT_MetaTileEntity_ElectricBlastFurnace int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; this.mHeatingCapacity = 0; - if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) { - return false; - } - if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) { + + replaceDeprecatedCoils(aBaseMetaTileEntity); + HeatingCoilLevel heatingCap = getInitialHeatLevel(aBaseMetaTileEntity, xDir, zDir); + if (heatingCap == null) return false; - } - if (!addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 11)) { + + if (!checkStructure(heatingCap, xDir, zDir, aBaseMetaTileEntity)) return false; - } - replaceDeprecatedCoils(aBaseMetaTileEntity); - byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir); - switch (tUsedMeta) { - case 0: - this.mHeatingCapacity = 1801; - break; - case 1: - this.mHeatingCapacity = 2701; - break; - case 2: - this.mHeatingCapacity = 3601; - break; - case 3: - this.mHeatingCapacity = 4501; - break; - case 4: - this.mHeatingCapacity = 5401; - break; - case 5: - this.mHeatingCapacity = 7201; - break; - case 6: - this.mHeatingCapacity = 9001; - break; - case 7: - this.mHeatingCapacity = 9901; - break; - case 8: - this.mHeatingCapacity = 10801; - break; - default: - return false; - } - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if ((i != 0) || (j != 0)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings5) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != tUsedMeta) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings5) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) { - return false; - } - if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), 11)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != GregTech_API.sBlockCasings1) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 11) { - return false; - } - } - } - } - } - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if ((xDir + i != 0) || (zDir + j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); - if ((!addMaintenanceToMachineList(tTileEntity, 11)) && (!addInputToMachineList(tTileEntity, 11)) && (!addOutputToMachineList(tTileEntity, 11)) && (!addEnergyInputToMachineList(tTileEntity, 11))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings1) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 11) { - return false; - } - } - } - } - } + + this.mHeatingCapacity = (int) heatingCap.getHeat(); this.mHeatingCapacity += 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2); return true; } - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ - boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack); - if (!result) this.mHeatingCapacity=0; - return result; - } + @Override + protected boolean checkTopLayer(int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity) { + if ((i == 0) && (j == 0)) { + return addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), CASING_INDEX); + } + if (addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), CASING_INDEX)) + return true; - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != GregTech_API.sBlockCasings1) + return false; - public int getPollutionPerTick(ItemStack aStack) { - return 20; + return aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) == CASING_INDEX; } - public int getDamageToComponent(ItemStack aStack) { - return 0; + @Override + protected boolean checkCoils(HeatingCoilLevel heatingCap, int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity) { + if ((i == 0) && (j == 0)) { + if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) + return false; + + return aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir); + } + + Block blockLow = aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j); + if (!(blockLow instanceof IHeatingCoil)) + return false; + + Block blockHi = aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j); + if (!(blockHi instanceof IHeatingCoil)) + return false; + + byte metaLow = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j); + HeatingCoilLevel coilHeatLow = ((IHeatingCoil) blockLow).getCoilHeat(metaLow); + byte metaHi = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j); + HeatingCoilLevel coilHeatHi = ((IHeatingCoil) blockHi).getCoilHeat(metaHi); + + return heatingCap == coilHeatLow && heatingCap == coilHeatHi; } - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + return this.checkMachineFunction(aBaseMetaTileEntity, aStack); } private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int tX = aBaseMetaTileEntity.getXCoord() + xDir; - int tY = (int) aBaseMetaTileEntity.getYCoord(); + 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)) { + if ((xPos == tX) && (zPos == tZ)) continue; - } for (int yPos = tY + 1; yPos <= tY + 2; yPos++) { tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); - if (tUsedMeta >= 12 && tUsedMeta <= 14 && aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) == GregTech_API.sBlockCasings1) { - aBaseMetaTileEntity.getWorld().setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3); - } + if (tUsedMeta < 12) + continue; + if (tUsedMeta > 14) + continue; + if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) + continue; + + aBaseMetaTileEntity.getWorld().setBlock( + xPos, + yPos, + zPos, + GregTech_API.sBlockCasings5, + tUsedMeta - 12, + 3 + ); } } } } + @Override - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) return false; + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) + return false; int targetHeight; FluidStack tLiquid = aLiquid.copy(); boolean isOutputPollution = false; for (FluidStack pollutionFluidStack : pollutionFluidStacks) { - if (tLiquid.isFluidEqual(pollutionFluidStack)) { - isOutputPollution = true; - break; - } + if (!tLiquid.isFluidEqual(pollutionFluidStack)) + continue; + + isOutputPollution = true; + break; } if (isOutputPollution) { targetHeight = this.controllerY + 3; int pollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - pollutionReduction = 100 - tHatch.calculatePollutionReduction(100); - break; - } + if (!isValidMetaTileEntity(tHatch)) + continue; + pollutionReduction = 100 - tHatch.calculatePollutionReduction(100); + break; } tLiquid.amount = tLiquid.amount * (pollutionReduction + 5) / 100; } else { targetHeight = this.controllerY; } for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { - if (tHatch.getBaseMetaTileEntity().getYCoord() == targetHeight) { - int tAmount = tHatch.fill(tLiquid, false); - if (tAmount >= tLiquid.amount) { - return tHatch.fill(tLiquid, true) >= tLiquid.amount; - } else if (tAmount > 0) { - tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); - } - } + if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? !tHatch.outputsSteam() : !tHatch.outputsLiquids()) + continue; + + if (tHatch.getBaseMetaTileEntity().getYCoord() != targetHeight) + continue; + + int tAmount = tHatch.fill(tLiquid, false); + if (tAmount >= tLiquid.amount) { + return tHatch.fill(tLiquid, true) >= tLiquid.amount; + } else if (tAmount > 0) { + tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); } } return false; @@ -396,37 +368,37 @@ public class GT_MetaTileEntity_ElectricBlastFurnace @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); - } + if (!isValidMetaTileEntity(tHatch)) + continue; + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); - } + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (!isValidMetaTileEntity(tHatch)) + continue; + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress")+": " +EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", - StatCollector.translateToLocal("GT5U.multiblock.energy")+": " +EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - StatCollector.translateToLocal("GT5U.multiblock.usage")+": "+EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei")+": "+EnumChatFormatting.YELLOW+Long.toString(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+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.EBF.heat")+": "+ - EnumChatFormatting.GREEN+mHeatingCapacity+EnumChatFormatting.RESET+" K", - StatCollector.translateToLocal("GT5U.multiblock.pollution")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + -mEUt + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + 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 + mHeatingCapacity + EnumChatFormatting.RESET + " K", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } } 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 363d689c84..2457a65dec 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java @@ -1,17 +1,14 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import net.minecraft.block.Block; @@ -19,6 +16,13 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import org.lwjgl.input.Keyboard; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_DieselEngine { @@ -32,34 +36,34 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Combustion Generator") - .addInfo("Controller block for the Extreme Combustion Engine") - .addInfo("Supply High Octane Gasoline and 8000L of Lubricant per hour to run") - .addInfo("Supply 320L/s of Liquid Oxygen to boost output (optional)") - .addInfo("Default: Produces 8192EU/t at 100% fuel efficiency") - .addInfo("Boosted: Produces 32768EU/t at 400% fuel efficiency") - .addInfo("You need to wait for it to reach 400% to output full power") - .addPollutionAmount(20 * getPollutionPerTick(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") - .addMaintenanceHatch("One of the casings next to a Gear Box") - .addMufflerHatch("Top middle back, above the rear Gear Box") - .addInputHatch("HOG, next to a Gear Box") - .addInputHatch("Lubricant, next to a Gear Box") - .addInputHatch("Liquid Oxygen, optional, next to a Gear Box") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Combustion Generator") + .addInfo("Controller block for the Extreme Combustion Engine") + .addInfo("Supply High Octane Gasoline and 8000L of Lubricant per hour to run") + .addInfo("Supply 320L/s of Liquid Oxygen to boost output (optional)") + .addInfo("Default: Produces 8192EU/t at 100% fuel efficiency") + .addInfo("Boosted: Produces 32768EU/t at 400% fuel efficiency") + .addInfo("You need to wait for it to reach 400% to output full power") + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMaintenanceHatch("One of the casings next to a Gear Box") + .addMufflerHatch("Top middle back, above the rear Gear Box") + .addInputHatch("HOG, next to a Gear Box") + .addInputHatch("Lubricant, next to a Gear Box") + .addInputHatch("Liquid Oxygen, optional, next to a Gear Box") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override @@ -70,9 +74,16 @@ 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) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][60], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE)}; + if (aActive) return new ITexture[]{ + casingTexturePages[0][60], + TextureFactory.of(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[0][60], + TextureFactory.of(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).glow().build()}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][60]}; + return new ITexture[]{casingTexturePages[0][60]}; } @Override @@ -176,8 +187,8 @@ 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 + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + 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, 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 e1db9d54f6..8e54010ccb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -1,13 +1,9 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - import gregtech.GT_Mod; -import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_MultiMachine; -import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -17,7 +13,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_GUIContainer_FusionReactor; @@ -30,11 +26,25 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; + +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; + public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity_MultiBlockBase { public GT_Recipe mLastRecipe; public int mEUStore; + static { + Textures.BlockIcons.setCasingTextureForId(52, + TextureFactory.of( + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() + )); + } + public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) { super(aID, aName, aNameRegional); } @@ -45,6 +55,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public abstract int tier(); + @Override public abstract long maxEUStore(); @Override @@ -57,8 +68,10 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png", GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName); } + @Override public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity); + @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { return aSide != getBaseMetaTileEntity().getFrontFacing(); @@ -110,18 +123,18 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity && (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (this.mEnergyHatches.size() >= 1) && (this.mOutputHatches.size() >= 1) && (this.mInputHatches.size() >= 2)) { int mEnergyHatches_sS = this.mEnergyHatches.size(); - for (int i = 0; i < mEnergyHatches_sS; i++) { - if (this.mEnergyHatches.get(i).mTier < tier()) + for (GT_MetaTileEntity_Hatch_Energy mEnergyHatch : this.mEnergyHatches) { + if (mEnergyHatch.mTier < tier()) return false; } int mOutputHatches_sS = this.mOutputHatches.size(); - for (int i = 0; i < mOutputHatches_sS; i++) { - if (this.mOutputHatches.get(i).mTier < tier()) + for (GT_MetaTileEntity_Hatch_Output mOutputHatch : this.mOutputHatches) { + if (mOutputHatch.mTier < tier()) return false; } int mInputHatches_sS = this.mInputHatches.size(); - for (int i = 0; i < mInputHatches_sS; i++) { - if (this.mInputHatches.get(i).mTier < tier()) + for (GT_MetaTileEntity_Hatch_Input mInputHatch : this.mInputHatches) { + if (mInputHatch.mTier < tier()) return false; } mWrench = true; @@ -138,8 +151,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity private boolean checkTier(byte tier, ArrayList<GT_MetaTileEntity_Hatch> list) { if (list != null) { int list_sS=list.size(); - for (int i = 0; i < list_sS; i++) { - if (list.get(i).mTier < tier) { + for (GT_MetaTileEntity_Hatch gt_metaTileEntity_hatch : list) { + if (gt_metaTileEntity_hatch.mTier < tier) { return false; } } @@ -218,23 +231,20 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public abstract int getFusionCoilMeta(); + @Override public abstract String[] getDescription(); + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - ITexture[] sTexture; - if (aSide == aFacing) { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)), new GT_RenderedTexture(getIconOverlay())}; - } else { - if (!aActive) { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; - } else { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; - } - } - return sTexture; + if (aSide == aFacing) return new ITexture[]{TextureFactory.of(MACHINE_CASING_FUSION_GLASS), getTextureOverlay()}; + if (aActive) return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(52)}; + return new ITexture[]{TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } - public abstract IIconContainer getIconOverlay(); + /** + * @return The list of textures overlay + */ + public abstract ITexture getTextureOverlay(); @Override public boolean isCorrectMachinePart(ItemStack aStack) { @@ -260,8 +270,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity int tFluidList_sS=tFluidList.size(); for (int i = 0; i < tFluidList_sS - 1; i++) { for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) { - if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { tFluidList.remove(j--); tFluidList_sS=tFluidList.size(); } else { tFluidList.remove(i--); tFluidList_sS=tFluidList.size(); @@ -272,13 +282,13 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity } if (tFluidList.size() > 1) { FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids, new ItemStack[]{}); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids); if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) { turnCasingActive(false); this.mLastRecipe = null; return false; } - if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { + if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids)) { this.mLastRecipe = tRecipe; this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); @@ -362,8 +372,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity mEfficiencyIncrease = 0; if (mOutputFluids != null && mOutputFluids.length > 0) { try { - GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); - } catch (Exception e) { + GT_Mod.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); + } catch (Exception ignored) { } } this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); @@ -420,6 +430,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return true; } + @Override public boolean drainEnergyInput(long aEU) { return false; } 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 9da832c81a..39b78c68bd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java @@ -1,17 +1,23 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; +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; +import org.lwjgl.input.Keyboard; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer { + private static final ITexture textureOverlay = TextureFactory.of( + TextureFactory.of(OVERLAY_FUSION1), + TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).glow().build()); + public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); } @@ -36,6 +42,11 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC } @Override + public Block getCasing() { + return GregTech_API.sBlockCasings1; + } + + @Override public int getCasingMeta() { return 6; } @@ -50,45 +61,41 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC return 15; } - public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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") - .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings") - .addInputHatch("2-16, Specified casings") - .addOutputHatch("1-16, Specified casings") - .addStructureInfo("ALL Hatches must be LuV or better") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } - } - @Override - public int tierOverclock() { - return 1; + public String[] getDescription() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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") + .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be LuV or better") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override - public Block getCasing() { - return GregTech_API.sBlockCasings1; + public ITexture getTextureOverlay() { + return textureOverlay; } @Override - public IIconContainer getIconOverlay() { - return Textures.BlockIcons.OVERLAY_FUSION1; + public int tierOverclock() { + return 1; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java index 7a363f8f6f..2ffa8ba4e1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java @@ -1,17 +1,23 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; +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; +import org.lwjgl.input.Keyboard; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2_GLOW; public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer { + private static final ITexture textureOverlay = TextureFactory.of( + TextureFactory.of(OVERLAY_FUSION2), + TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).glow().build()); + public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); } @@ -36,6 +42,11 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC } @Override + public Block getCasing() { + return GregTech_API.sBlockCasings4; + } + + @Override public int getCasingMeta() { return 6; } @@ -50,44 +61,40 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC return 7; } - public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("It's over 9000!!!") - .addInfo("Controller block for the Fusion Reactor Mk II") - .addInfo("4096EU/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") - .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings") - .addInputHatch("2-16, Specified casings") - .addOutputHatch("1-16, Specified casings") - .addStructureInfo("ALL Hatches must be ZPM or better") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } - } - @Override - public int tierOverclock() { - return 2; + public String[] getDescription() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("It's over 9000!!!") + .addInfo("Controller block for the Fusion Reactor Mk II") + .addInfo("4096EU/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") + .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be ZPM or better") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override - public Block getCasing() { - return GregTech_API.sBlockCasings4; + public ITexture getTextureOverlay() { + return textureOverlay; } @Override - public IIconContainer getIconOverlay() { - return Textures.BlockIcons.OVERLAY_FUSION2; + public int tierOverclock() { + return 2; } } 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 a575427791..e8ae396954 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java @@ -1,17 +1,23 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; +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; +import org.lwjgl.input.Keyboard; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW; public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer { + private static final ITexture textureOverlay = TextureFactory.of( + TextureFactory.of(OVERLAY_FUSION3), + TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).glow().build()); + public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); } @@ -36,6 +42,11 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC } @Override + public Block getCasing() { + return GregTech_API.sBlockCasings4; + } + + @Override public int getCasingMeta() { return 8; } @@ -50,45 +61,41 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC return 7; } - public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("A SUN DOWN ON EARTH") - .addInfo("Controller block for the Fusion Reactor Mk III") - .addInfo("8192EU/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") - .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings") - .addInputHatch("2-16, Specified casings") - .addOutputHatch("1-16, Specified casings") - .addStructureInfo("ALL Hatches must be UV or better") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } - } - @Override - public int tierOverclock() { - return 4; + public String[] getDescription() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("A SUN DOWN ON EARTH") + .addInfo("Controller block for the Fusion Reactor Mk III") + .addInfo("8192EU/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") + .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be UV or better") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override - public Block getCasing() { - return GregTech_API.sBlockCasings4; + public ITexture getTextureOverlay() { + return textureOverlay; } @Override - public IIconContainer getIconOverlay() { - return Textures.BlockIcons.OVERLAY_FUSION3; + public int tierOverclock() { + return 4; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index dfa58c6407..9ce1de3fec 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -1,9 +1,6 @@ package gregtech.common.tileentities.machines.multi; -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,7 +9,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; @@ -25,6 +22,13 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBlockBase { public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25) @@ -43,31 +47,32 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc super(aName); } + @Override public String[] getDescription() { - 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") - .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") - .addCasingInfo("Stable Titanium Machine Casing", 20) - .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks") - .addMaintenanceHatch("Any casing") - .addInputHatch("Hot fluid, bottom center") - .addInputHatch("Distilled water, any casing") - .addOutputHatch("Cold fluid, top center") - .addOutputHatch("Steam/SH Steam, any casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + 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") + .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") + .addCasingInfo("Stable Titanium Machine Casing", 20) + .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks") + .addMaintenanceHatch("Any casing") + .addInputHatch("Hot fluid, bottom center") + .addInputHatch("Distilled water, any casing") + .addOutputHatch("Cold fluid, top center") + .addOutputHatch("Steam/SH Steam, any casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override @@ -82,25 +87,38 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc super.saveNBTData(aNBT); } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][50], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER)}; + if (aActive) + return new ITexture[]{ + casingTexturePages[0][50], + TextureFactory.of(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[0][50], + TextureFactory.of(OVERLAY_FRONT_HEAT_EXCHANGER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).glow().build()}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][50]}; + return new ITexture[]{casingTexturePages[0][50]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeHeatExchanger.png"); } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { if (mInputHotFluidHatch.getFluid() == null) return true; @@ -146,11 +164,10 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc this.mEUt = (int) (fluidAmountToConsume * steam_output_multiplier * efficiency); if (do_lava) { mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("ic2pahoehoelava", fluidAmountToConsume), true); - this.mEfficiencyIncrease = 80; } else { mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("ic2coolant", fluidAmountToConsume), true); - this.mEfficiencyIncrease = 80; } + this.mEfficiencyIncrease = 80; return true; } @@ -161,6 +178,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc return usage; } + @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. @@ -189,6 +207,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc return true; } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -239,10 +258,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc } public boolean ignoreController(Block tTileEntity) { - if (!controller && tTileEntity == GregTech_API.sBlockMachines) { - return true; - } - return false; + return !controller && tTileEntity == GregTech_API.sBlockMachines; } public boolean addColdFluidOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { @@ -290,21 +306,26 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc return 14; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_HeatExchanger(this.mName); } @@ -317,17 +338,17 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc @Override public String[] getInfoData() { return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress")+": "+ - EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", - StatCollector.translateToLocal("GT5U.multiblock.usage")+" "+StatCollector.translateToLocal("GT5U.LHE.steam")+": "+ - (superheated?EnumChatFormatting.RED:EnumChatFormatting.YELLOW) + Integer.toString(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+Float.toString(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 + superheated_threshold + EnumChatFormatting.RESET + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.usage") + " " + StatCollector.translateToLocal("GT5U.LHE.steam") + ": " + + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) + (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 + superheated_threshold + EnumChatFormatting.RESET }; } -}
\ No newline at end of file +} 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 9e002badbf..3d979bb862 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 @@ -2,12 +2,13 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -15,13 +16,16 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW; -public class GT_MetaTileEntity_ImplosionCompressor - extends GT_MetaTileEntity_MultiBlockBase { +public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_MultiBlockBase { public GT_MetaTileEntity_ImplosionCompressor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -30,64 +34,79 @@ public class GT_MetaTileEntity_ImplosionCompressor super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ImplosionCompressor(this.mName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Implosion Compressor") - .addInfo("Explosions are fun") - .addInfo("Controller block for the Implosion Compressor") - .addPollutionAmount(20 * getPollutionPerTick(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") - .addMaintenanceHatch("Any casing") - .addMufflerHatch("Any casing") - .addInputBus("Any casing") - .addOutputBus("Any casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Implosion Compressor") + .addInfo("Explosions are fun") + .addInfo("Controller block for the Implosion Compressor") + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMaintenanceHatch("Any casing") + .addMufflerHatch("Any casing") + .addInputBus("Any casing") + .addOutputBus("Any casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR)}; + if (aActive) return new ITexture[]{ + BlockIcons.casingTexturePages[0][16], + TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.casingTexturePages[0][16], + TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ImplosionCompressor.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sImplosionRecipes; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tInputList = getStoredInputs(); int tInputList_sS=tInputList.size(); for (int i = 0; i < tInputList_sS - 1; i++) { for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { - if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { tInputList.remove(j--); tInputList_sS=tInputList.size(); } else { tInputList.remove(i--); tInputList_sS=tInputList.size(); @@ -96,8 +115,8 @@ public class GT_MetaTileEntity_ImplosionCompressor } } } - ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); - if (tInputList.size() > 0) { + 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); if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); @@ -119,13 +138,15 @@ public class GT_MetaTileEntity_ImplosionCompressor return false; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 20) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(5), 10, 1.0F, aX, aY, aZ); } } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -153,18 +174,22 @@ public class GT_MetaTileEntity_ImplosionCompressor return tAmount >= 16; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 500; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } 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 551abdf38a..841a4fb57c 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 @@ -4,27 +4,39 @@ import gregtech.GT_Mod; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.*; +import gregtech.api.render.TextureFactory; +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_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; 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 org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_GLOW; -public abstract class GT_MetaTileEntity_LargeBoiler - extends GT_MetaTileEntity_MultiBlockBase { +public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_MultiBlockBase { private boolean firstRun = true; private int mSuperEfficencyIncrease = 0; private int integratedCircuitConfig = 0; //Steam output is reduced by 1000L per config + private int excessWater = 0; //Eliminate rounding errors for water private int excessFuel = 0; //Eliminate rounding errors for fuels that burn half items private int excessProjectedEU = 0; //Eliminate rounding errors from throttling the boiler @@ -36,35 +48,36 @@ public abstract class GT_MetaTileEntity_LargeBoiler super(aName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Boiler") - .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler") - .addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//? - .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") - .addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again - .addPollutionAmount(20 * getPollutionPerTick(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") - .addMufflerHatch("Any firebox") - .addInputBus("Solid fuel, Any firebox") - .addInputHatch("Liquid fuel, Any firebox") - .addStructureInfo("You can use either, or both") - .addInputHatch("Water, Any firebox") - .addOutputHatch("Steam, any casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Boiler") + .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler") + .addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//? + .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") + .addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMufflerHatch("Any firebox") + .addInputBus("Solid fuel, Any firebox") + .addInputHatch("Liquid fuel, Any firebox") + .addStructureInfo("You can use either, or both") + .addInputHatch("Water, Any firebox") + .addOutputHatch("Steam, any casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } - + public abstract String getCasingMaterial(); public abstract Block getCasingBlock(); @@ -89,25 +102,37 @@ public abstract class GT_MetaTileEntity_LargeBoiler public abstract int getEfficiencyIncrease(); + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)}; + if (aActive) return new ITexture[]{ + BlockIcons.getCasingTextureForId(getCasingTextureIndex()), + TextureFactory.of(OVERLAY_FRONT_LARGE_BOILER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.getCasingTextureForId(getCasingTextureIndex()), + TextureFactory.of(OVERLAY_FRONT_LARGE_BOILER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeBoiler.png"); } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { //Do we have an integrated circuit with a valid configuration? if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) { @@ -176,13 +201,17 @@ public abstract class GT_MetaTileEntity_LargeBoiler abstract int runtimeBoost(int mTime); + @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))); int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { - long amount = (tGeneratedEU + 160) / 160; + long amount = (tGeneratedEU + STEAM_PER_WATER) / STEAM_PER_WATER; + excessWater += amount * STEAM_PER_WATER - tGeneratedEU; + amount -= excessWater / STEAM_PER_WATER; + excessWater %= STEAM_PER_WATER; if (depleteInput(Materials.Water.getFluid(amount)) || depleteInput(GT_ModHandler.getDistilledWater(amount))) { addOutput(GT_ModHandler.getSteam(tGeneratedEU)); } else { @@ -196,6 +225,22 @@ public abstract class GT_MetaTileEntity_LargeBoiler } @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("excessFuel", excessFuel); + aNBT.setInteger("excessWater", excessWater); + aNBT.setInteger("excessProjectedEU", excessProjectedEU); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + excessFuel = aNBT.getInteger("excessFuel"); + excessWater = aNBT.getInteger("excessWater"); + excessProjectedEU = aNBT.getInteger("excessProjectedEU"); + } + + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (mProgresstime > 0 && firstRun) { firstRun = false; @@ -204,6 +249,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler super.onPostTick(aBaseMetaTileEntity, aTick); } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -264,19 +310,23 @@ public abstract class GT_MetaTileEntity_LargeBoiler return tCasingAmount >= 24 && tFireboxAmount >= 3; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig); return Math.max(1, 12 * adjustedEUOutput / getEUt()); } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } 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 c44f47f726..9aeff9b3d0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java @@ -5,8 +5,7 @@ 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 { +public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -15,10 +14,12 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LargeBoiler_Bronze(this.mName); } + @Override public String getCasingMaterial(){ return "Bronze"; } @@ -28,42 +29,52 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze return "Plated Bricks"; } + @Override public Block getCasingBlock() { return GregTech_API.sBlockCasings1; } + @Override public byte getCasingMeta() { return 10; } + @Override public byte getCasingTextureIndex() { return 10; } + @Override public Block getPipeBlock() { return GregTech_API.sBlockCasings2; } + @Override public byte getPipeMeta() { return 12; } + @Override public Block getFireboxBlock() { return GregTech_API.sBlockCasings3; } + @Override public byte getFireboxMeta() { return 13; } + @Override public byte getFireboxTextureIndex() { return 45; } + @Override public int getEUt() { return 400; } + @Override public int getEfficiencyIncrease() { return 16; } 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 12a08a858d..d1188955f4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java @@ -5,8 +5,7 @@ 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 class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -15,10 +14,12 @@ public class GT_MetaTileEntity_LargeBoiler_Steel super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LargeBoiler_Steel(this.mName); } + @Override public String getCasingMaterial(){ return "Steel"; } @@ -28,42 +29,52 @@ public class GT_MetaTileEntity_LargeBoiler_Steel return "Machine Casings"; } + @Override public Block getCasingBlock() { return GregTech_API.sBlockCasings2; } + @Override public byte getCasingMeta() { return 0; } + @Override public byte getCasingTextureIndex() { return 16; } + @Override public Block getPipeBlock() { return GregTech_API.sBlockCasings2; } + @Override public byte getPipeMeta() { return 13; } + @Override public Block getFireboxBlock() { return GregTech_API.sBlockCasings3; } + @Override public byte getFireboxMeta() { return 14; } + @Override public byte getFireboxTextureIndex() { return 46; } + @Override public int getEUt() { return 600; } + @Override public int getEfficiencyIncrease() { return 12; } 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 c0a06168ab..e67cf64723 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 @@ -5,8 +5,7 @@ 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 class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -15,10 +14,12 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LargeBoiler_Titanium(this.mName); } + @Override public String getCasingMaterial(){ return "Titanium"; } @@ -28,42 +29,52 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium return "Machine Casings"; } + @Override public Block getCasingBlock() { return GregTech_API.sBlockCasings4; } + @Override public byte getCasingMeta() { return 2; } + @Override public byte getCasingTextureIndex() { return 50; } + @Override public Block getPipeBlock() { return GregTech_API.sBlockCasings2; } + @Override public byte getPipeMeta() { return 14; } + @Override public Block getFireboxBlock() { return GregTech_API.sBlockCasings4; } + @Override public byte getFireboxMeta() { return 3; } + @Override public byte getFireboxTextureIndex() { return 51; } + @Override public int getEUt() { return 800; } + @Override public int getEfficiencyIncrease() { return 8; } @@ -72,4 +83,4 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium int runtimeBoost(int mTime) { return mTime * 130 / 100; } -}
\ No newline at end of file +} 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 629733ad9d..78e7d25752 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 @@ -5,8 +5,7 @@ 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 class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -15,10 +14,12 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LargeBoiler_TungstenSteel(this.mName); } + @Override public String getCasingMaterial(){ return "TungstenSteel"; } @@ -28,42 +29,52 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel return "Machine Casings"; } + @Override public Block getCasingBlock() { return GregTech_API.sBlockCasings4; } + @Override public byte getCasingMeta() { return 0; } + @Override public byte getCasingTextureIndex() { return 48; } + @Override public Block getPipeBlock() { return GregTech_API.sBlockCasings2; } + @Override public byte getPipeMeta() { return 15; } + @Override public Block getFireboxBlock() { return GregTech_API.sBlockCasings3; } + @Override public byte getFireboxMeta() { return 15; } + @Override public byte getFireboxTextureIndex() { return 47; } + @Override public int getEUt() { return 1000; } + @Override public int getEfficiencyIncrease() { return 4; } 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 d462b9a36d..c9de809b58 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -1,13 +1,12 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -16,214 +15,223 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { - private final int CASING_INDEX = 176; - - public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_LargeChemicalReactor(String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LargeChemicalReactor(this.mName); - } - - @Override - public String[] getDescription() { - 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") - .addCasingInfo("Chemically Inert Machine Casing", 8) - .addOtherStructurePart("PTFE Pipe Machine Casing", "Center") - .addOtherStructurePart("Cupronickel Coil Block", "Adjacent to the PTFE Pipe Machine Casing") - .addEnergyHatch("Any casing") - .addMaintenanceHatch("Any casing") - .addInputBus("Any casing") - .addInputHatch("Any casing") - .addOutputBus("Any casing") - .addOutputHatch("Any casing") - .addStructureInfo("You can have multiple hatches/busses") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, - boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { - Textures.BlockIcons.casingTexturePages[1][48], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR) }; - } - return new ITexture[] { Textures.BlockIcons.casingTexturePages[1][48] }; - } - - @Override + private final int CASING_INDEX = 176; + + public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeChemicalReactor(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeChemicalReactor(this.mName); + } + + @Override + public String[] getDescription() { + 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") + .addCasingInfo("Chemically Inert Machine Casing", 8) + .addOtherStructurePart("PTFE Pipe Machine Casing", "Center") + .addOtherStructurePart("Cupronickel Coil Block", "Adjacent to the PTFE Pipe Machine Casing") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputBus("Any casing") + .addInputHatch("Any casing") + .addOutputBus("Any casing") + .addOutputHatch("Any casing") + .addStructureInfo("You can have multiple hatches/busses") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } + } + + @Override + 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.of(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[1][48], + TextureFactory.of(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR), + TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).glow().build()}; + } + return new ITexture[]{casingTexturePages[1][48]}; + } + + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png"); } - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - ArrayList<ItemStack> tInputList = getStoredInputs(); - int tInputList_sS = tInputList.size(); - for (int i = 0; i < tInputList_sS - 1; i++) { - for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { - if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { - tInputList.remove(j--); - tInputList_sS = tInputList.size(); - } else { - tInputList.remove(i--); - tInputList_sS = tInputList.size(); - break; - } - } - } - } - tInputList.add(mInventory[1]); - ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ArrayList<FluidStack> tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } - } - FluidStack[] fluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - - if (inputs.length > 0 || fluids.length > 0) { - long tVoltage = getMaxInputVoltage(); - byte tier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, - false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); - if (tRecipe != null && tRecipe.isRecipeInputEqual(true, fluids, inputs)) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - calculatePerfectOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mOutputItems = tRecipe.mOutputs; - this.mOutputFluids = tRecipe.mFluidOutputs; - this.updateSlots(); - return true; - } - } - return false; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - int casingAmount = 0; - boolean hasHeatingCoil = false; - // x=width, z=depth, y=height - for (int x = -1 + xDir; x <= xDir + 1; x++) { - for (int z = -1 + zDir; z <= zDir + 1; z++) { - for (int y = -1; y <= 1; y++) { - if (x == 0 && y == 0 && z == 0) { - continue; - } - IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); - Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); - int centerCoords = 0; - if (x == xDir) { - centerCoords++; - } - if (y == 0) { - centerCoords++; - } - if (z == zDir) { - centerCoords++; - } - if (centerCoords == 3) { - if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 1) { - continue; - } else { - return false; - } - } - if (centerCoords == 2 && block == GregTech_API.sBlockCasings5 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { - hasHeatingCoil = true; - continue; - } - if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) - && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) - && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { - if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { - casingAmount++; - } else { - return false; - } - } - - } - } - - } - return casingAmount >= 8 && hasHeatingCoil && !mEnergyHatches.isEmpty() && !mMaintenanceHatches.isEmpty(); - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + ArrayList<ItemStack> tInputList = getStoredInputs(); + int tInputList_sS = tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + } + } + } + tInputList.add(mInventory[1]); + ItemStack[] inputs = tInputList.toArray(new ItemStack[0]); + + ArrayList<FluidStack> tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + FluidStack[] fluids = tFluidList.toArray(new FluidStack[0]); + + if (inputs.length > 0 || fluids.length > 0) { + long tVoltage = getMaxInputVoltage(); + byte tier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, + false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + if (tRecipe != null && tRecipe.isRecipeInputEqual(true, fluids, inputs)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + calculatePerfectOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mOutputItems = tRecipe.mOutputs; + this.mOutputFluids = tRecipe.mFluidOutputs; + this.updateSlots(); + return true; + } + } + return false; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + int casingAmount = 0; + boolean hasHeatingCoil = false; + // x=width, z=depth, y=height + for (int x = -1 + xDir; x <= xDir + 1; x++) { + for (int z = -1 + zDir; z <= zDir + 1; z++) { + for (int y = -1; y <= 1; y++) { + if (x == 0 && y == 0 && z == 0) { + continue; + } + IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); + Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); + int centerCoords = 0; + if (x == xDir) { + centerCoords++; + } + if (y == 0) { + centerCoords++; + } + if (z == zDir) { + centerCoords++; + } + if (centerCoords == 3) { + if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 1) { + continue; + } else { + return false; + } + } + if (centerCoords == 2 && block == GregTech_API.sBlockCasings5 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + hasHeatingCoil = true; + continue; + } + if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) + && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) + && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { + if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + casingAmount++; + } else { + return false; + } + } + + } + } + + } + return casingAmount >= 8 && hasHeatingCoil && !mEnergyHatches.isEmpty() && !mMaintenanceHatches.isEmpty(); + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } } 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 8d4d81a5d2..a43de4cd9d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -1,7 +1,5 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; - import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; @@ -19,6 +17,8 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; + public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlockBase { protected int baseEff = 0; @@ -40,6 +40,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M return getMaxEfficiency(aStack) > 0; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); } @@ -175,15 +176,6 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M this.mMaxProgresstime = 1; this.mEfficiencyIncrease = 10; // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. - /* - if(this.mDynamoHatches.size()>0){ - for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) - if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) { - GT_Log.exp.println("Turbine "+this.mName+" DynHatch Explosion!"); - explodeMultiblock(); - } - } - */ return true; } } @@ -195,6 +187,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M return 1; } + @Override public int getMaxEfficiency(ItemStack aStack) { if (GT_Utility.isStackInvalid(aStack)) { return 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 6c482db6e7..b8f3d835fa 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -1,16 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; -import java.util.Collection; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -18,6 +12,15 @@ import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; +import java.util.Collection; + +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeTurbine { @@ -31,29 +34,30 @@ 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[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.casingTexturePages[0][58]}; + return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_SS_ACTIVE5) : TextureFactory.of(LARGETURBINE_SS5) : casingTexturePages[0][58]}; } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Gas Turbine") - .addInfo("Controller block for the Large Gas Turbine") - .addInfo("Needs a Turbine, place inside controller") - .addPollutionAmount(20 * getPollutionPerTick(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Stainless Steel Turbine Casing", 24) - .addDynamoHatch("Back center") - .addMaintenanceHatch("Side centered") - .addMufflerHatch("Side centered") - .addInputHatch("Gas Fuel, Side centered") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Gas Turbine") + .addInfo("Controller block for the Large Gas Turbine") + .addInfo("Needs a Turbine, place inside controller") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Stainless Steel Turbine Casing", 24) + .addDynamoHatch("Back center") + .addMaintenanceHatch("Side centered") + .addMufflerHatch("Side centered") + .addInputHatch("Gas Fuel, Side centered") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } public int getFuelValue(FluidStack aLiquid) { @@ -99,7 +103,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT 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) { // turbine too weak and/or fuel too powerful // at least consume 1L @@ -107,39 +111,35 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT // wastes the extra fuel and generate aOptFlow directly depleteInput(new FluidStack(firstFuelType, 1)); this.storedFluid += 1; - return GT_Utility.safeInt((long)aOptFlow * (long)aBaseEff / 10000L); + return GT_Utility.safeInt((long) aOptFlow * (long) aBaseEff / 10000L); } - - actualOptimalFlow = GT_Utility.safeInt((long)aOptFlow / fuelValue); + + actualOptimalFlow = GT_Utility.safeInt((long) aOptFlow / fuelValue); this.realOptFlow = actualOptimalFlow; - int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. int flow = 0; int totalFlow = 0; - storedFluid=0; - int aFluids_sS=aFluids.size(); - for (int i = 0; i < aFluids_sS; i++) { - if (aFluids.get(i).isFluidEqual(firstFuelType)) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up to 125% of optimal flow w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; + storedFluid = 0; + for (FluidStack aFluid : aFluids) { + if (aFluid.isFluidEqual(firstFuelType)) { + flow = Math.min(aFluid.amount, remainingFlow); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluid, flow)); // deplete that amount + this.storedFluid += aFluid.amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used } } - if(totalFlow<=0)return 0; - tEU = GT_Utility.safeInt((long)totalFlow * fuelValue); - - if (totalFlow != actualOptimalFlow) { - float efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow); - //if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} - //if (efficiency < 0) - // efficiency = 0; // Can happen with really ludicrously poor inefficiency. - tEU *= efficiency; - tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); + if (totalFlow <= 0) return 0; + tEU = GT_Utility.safeInt((long) totalFlow * fuelValue); + + if (totalFlow == actualOptimalFlow) { + tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } else { - tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); + float efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); + tEU *= efficiency; + tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } return tEU; 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 2355b89fa8..fb510f1352 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -1,18 +1,11 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -21,11 +14,20 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; + +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_LargeTurbine { public boolean achievement = false; - private boolean looseFit=false; + private boolean looseFit = false; public GT_MetaTileEntity_LargeTurbine_HPSteam(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -37,31 +39,32 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI5) : Textures.BlockIcons.casingTexturePages[0][59]}; + return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_TI_ACTIVE5) : TextureFactory.of(LARGETURBINE_TI5) : casingTexturePages[0][59]}; } + @Override public String[] getDescription() { - 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") - .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") - .addMaintenanceHatch("Side centered") - .addInputHatch("Superheated Steam, Side centered") - .addOutputHatch("Steam, Side centered") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + 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") + .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") + .addMaintenanceHatch("Side centered") + .addInputHatch("Superheated Steam, Side centered") + .addOutputHatch("Steam, Side centered") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override @@ -91,54 +94,54 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) { - if(looseFit) { - aOptFlow*=4; - if(aBaseEff>10000){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff=7500; - }else if(aBaseEff>7500){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff*=0.75f; - }else{ - aBaseEff*=0.75f; + if (looseFit) { + aOptFlow *= 4; + if (aBaseEff > 10000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); + aBaseEff = 7500; + } else if (aBaseEff > 7500) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); + aBaseEff *= 0.75f; + } else { + aBaseEff *= 0.75f; } } int tEU = 0; int totalFlow = 0; // Byproducts are based on actual flow int flow = 0; - int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. this.realOptFlow = aOptFlow; - storedFluid=0; + storedFluid = 0; for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { - String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); - if (fluidName.equals("ic2.fluidSuperheatedSteam")) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; + final FluidStack aFluidStack = aFluids.get(i); + if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) { + flow = Math.min(aFluidStack.amount, remainingFlow); // try to use up w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluidStack, flow)); // deplete that amount + this.storedFluid += aFluidStack.amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used if (!achievement) { try { - GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); - } catch (Exception e) { + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + } catch (Exception ignored) { } achievement = true; } - }else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){ - depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); + } else if (GT_ModHandler.isAnySteam(aFluidStack)) { + depleteInput(new FluidStack(aFluidStack, aFluidStack.amount)); } } - if(totalFlow<=0)return 0; + if (totalFlow <= 0) return 0; tEU = totalFlow; addOutput(GT_ModHandler.getSteam(totalFlow)); - if (totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); + if (totalFlow == aOptFlow) { + tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); + } else { + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float) aOptFlow); //if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L)); - } else { - tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L); + tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L)); } return tEU; @@ -147,79 +150,32 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - looseFit^=true; + looseFit ^= true; GT_Utility.sendChatToPlayer(aPlayer, looseFit ? trans("500", "Fitting: Loose - More Flow") : trans("501", "Fitting: Tight - More Efficiency")); } } @Override public int getDamageToComponent(ItemStack aStack) { - return (looseFit && XSTR_INSTANCE.nextInt(4)==0)?0:1; + return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1; } - - + @Override public String[] getInfoData() { - super.looseFit = looseFit; - return super.getInfoData(); + super.looseFit = looseFit; + return super.getInfoData(); } - /* - * moved to super - * - int mPollutionReduction=0; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); - } - } - - String tRunning = mMaxProgresstime>0 ? - EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET; - String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Needs Maintainance"+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)); - } - - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { - if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } - - return new String[]{ - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", // 1 - tMaintainance, // 2 - "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", // 2 - "Stored Energy:" + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ // 3 - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t" + // 4 - EnumChatFormatting.YELLOW+"("+(looseFit?"Loose":"Tight")+")", // 5 - "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", // 6 - "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", // 7 - "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" // 8 - }; - } - */ - @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setBoolean("turbineFitting",looseFit); + aNBT.setBoolean("turbineFitting", looseFit); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - looseFit=aNBT.getBoolean("turbineFitting"); + looseFit = aNBT.getBoolean("turbineFitting"); } } 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 bb5134097a..bf1506ec81 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -1,25 +1,33 @@ package gregtech.common.tileentities.machines.multi; -import java.util.ArrayList; -import java.util.Collection; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; 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 gregtech.common.items.GT_MetaGenerated_Tool_01; 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 org.lwjgl.input.Keyboard; + +import java.util.ArrayList; +import java.util.Collection; + +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_LargeTurbine { @@ -33,29 +41,30 @@ 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[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.casingTexturePages[0][60]}; + return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_TU_ACTIVE5) : TextureFactory.of(Textures.BlockIcons.LARGETURBINE_TU5) : casingTexturePages[0][60]}; } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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") - .addMaintenanceHatch("Side centered") - .addInputHatch("Plasma Fluid, Side centered") - .addOutputHatch("Molten Fluid, optional, Side centered") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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") + .addMaintenanceHatch("Side centered") + .addInputHatch("Plasma Fluid, Side centered") + .addOutputHatch("Molten Fluid, optional, Side centered") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } public int getFuelValue(FluidStack aLiquid) { @@ -99,54 +108,51 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar aOptFlow *= 800;//CHANGED THINGS HERE, check recipe runs once per 20 ticks int tEU = 0; - int actualOptimalFlow = 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! int fuelValue = getFuelValue(firstFuelType); - actualOptimalFlow = GT_Utility.safeInt((long)Math.ceil((double)aOptFlow / (double)fuelValue)); + actualOptimalFlow = GT_Utility.safeInt((long) Math.ceil((double) aOptFlow / (double) fuelValue)); this.realOptFlow = actualOptimalFlow; // For scanner info - int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. int flow = 0; int totalFlow = 0; - storedFluid=0; - int aFluids_sS=aFluids.size(); - for (int i = 0; i < aFluids_sS; i++) { - if (aFluids.get(i).isFluidEqual(firstFuelType)) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; + storedFluid = 0; + for (FluidStack aFluid : aFluids) { + if (aFluid.isFluidEqual(firstFuelType)) { + flow = Math.min(aFluid.amount, remainingFlow); // try to use up w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluid, flow)); // deplete that amount + this.storedFluid += aFluid.amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used } } String fn = FluidRegistry.getFluidName(firstFuelType); - String[] nameSegments = fn.split("\\.",2); - if (nameSegments.length==2){ - String outputName=nameSegments[1]; + String[] nameSegments = fn.split("\\.", 2); + if (nameSegments.length == 2) { + String outputName = nameSegments[1]; FluidStack output = FluidRegistry.getFluidStack(outputName, totalFlow); - if (output==null){ - output = FluidRegistry.getFluidStack("molten."+outputName, totalFlow); + if (output == null) { + output = FluidRegistry.getFluidStack("molten." + outputName, totalFlow); } - if (output!=null) { + if (output != null) { addOutput(output); } } - if(totalFlow<=0)return 0; - tEU = GT_Utility.safeInt((long)((fuelValue / 20D) * (double)totalFlow)); + if (totalFlow <= 0) return 0; + tEU = GT_Utility.safeInt((long) ((fuelValue / 20D) * (double) totalFlow)); //GT_FML_LOGGER.info(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU); - if (totalFlow != actualOptimalFlow) { - double efficiency = 1.0D - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow); - //if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} - //if (efficiency < 0) - // efficiency = 0; // Can happen with really ludicrously poor inefficiency. - tEU = (int)(tEU * efficiency); - tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU)); + if (totalFlow == actualOptimalFlow) { + tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); } else { - tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU)); + double efficiency = 1.0D - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); + + tEU = (int) (tEU * efficiency); + tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); } return tEU; @@ -157,17 +163,17 @@ 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.size() > 0) { + if (!tFluids.isEmpty()) { 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, + 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)); @@ -176,7 +182,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } } - if(optFlow<=0 || baseEff<=0){ + if (optFlow <= 0 || baseEff <= 0) { stopMachine();//in case the turbine got removed return false; } @@ -187,7 +193,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) // This is how much the turbine can actually change during this tick - int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long)Math.abs(difference)/5)); + int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long) Math.abs(difference) / 5)); if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. @@ -197,37 +203,34 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (this.mEUt <= 0) { //stopMachine(); - this.mEUt=0; - this.mEfficiency=0; + this.mEUt = 0; + this.mEfficiency = 0; return false; } else { this.mMaxProgresstime = 20; this.mEfficiencyIncrease = 200; // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here. - /* - if(this.mDynamoHatches.size()>0){ - for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) - if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) { - GT_Log.exp.println("Turbine "+this.mName+" DynHatch Explosion!"); - explodeMultiblock(); - } - } - */ + return true; } } - /* - * moved to super - * - * @Override + @Override public String[] getInfoData() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + } + } + String tRunning = mMaxProgresstime>0 ? - EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET; + + EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.running.true")+EnumChatFormatting.RESET : + EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.running.false")+EnumChatFormatting.RESET; String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Needs Maintainance"+EnumChatFormatting.RESET ; + EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : + EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET ; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { @@ -242,19 +245,21 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - - return new String[]{ - EnumChatFormatting.BLUE+"Large Turbine"+EnumChatFormatting.RESET, - "Stored Energy:", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - tRunning, - "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", - "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/s", - "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", - "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", - "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", - tMaintainance, + String[] ret = new String[]{ + // 8 Lines available for information panels + tRunning + ": " + EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", /* 1 */ + tMaintainance, /* 2 */ + StatCollector.translateToLocal("GT5U.turbine.efficiency")+": "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", /* 2 */ + StatCollector.translateToLocal("GT5U.multiblock.energy")+": " + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ /* 3 */ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+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+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"; + 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 20bcbf10d0..44e7dfd695 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -1,18 +1,11 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -21,12 +14,22 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; + +import java.util.ArrayList; + +import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_LargeTurbine { - private float water; + private int excessWater; private boolean achievement = false; - private boolean looseFit=false; + private boolean looseFit = false; public GT_MetaTileEntity_LargeTurbine_Steam(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -39,31 +42,32 @@ 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[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.casingTexturePages[0][57]}; + return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_ST_ACTIVE5) : TextureFactory.of(LARGETURBINE_ST5) : casingTexturePages[0][57]}; } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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") - .addMaintenanceHatch("Side centered") - .addInputHatch("Steam, Side centered") - .addOutputHatch("Distilled Water, Side centered") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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") + .addMaintenanceHatch("Side centered") + .addInputHatch("Steam, Side centered") + .addOutputHatch("Distilled Water, Side centered") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @Override @@ -91,61 +95,60 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg return 0; } - private int useWater(float input) { - water = water + input; - int usage = (int) water; - water = water - usage; - return usage; + private int condenseSteam(int steam) { + excessWater += steam; + int water = excessWater / STEAM_PER_WATER; + excessWater %= STEAM_PER_WATER; + return water; } @Override int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) { - if(looseFit) { - aOptFlow*=4; - if(aBaseEff>10000){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff=7500; - }else if(aBaseEff>7500){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff*=0.75f; - }else{ - aBaseEff*=0.75f; + if (looseFit) { + aOptFlow *= 4; + if (aBaseEff > 10000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); + aBaseEff = 7500; + } else if (aBaseEff > 7500) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); + aBaseEff *= 0.75f; + } else { + aBaseEff *= 0.75f; } } int tEU = 0; int totalFlow = 0; // Byproducts are based on actual flow int flow = 0; - int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int remainingFlow = GT_Utility.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. this.realOptFlow = aOptFlow; - storedFluid=0; + storedFluid = 0; for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals. - String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); - if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; + final FluidStack aFluidStack = aFluids.get(i); + if (GT_ModHandler.isAnySteam(aFluidStack)) { + flow = Math.min(aFluidStack.amount, remainingFlow); // try to use up w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluidStack, flow)); // deplete that amount + this.storedFluid += aFluidStack.amount; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used if (!achievement) { - GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); achievement = true; } - }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ - depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); + } else if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) { + depleteInput(new FluidStack(aFluidStack, aFluidStack.amount)); } } - if(totalFlow<=0)return 0; + if (totalFlow <= 0) return 0; tEU = totalFlow; - int waterToOutput = useWater(totalFlow / 160.0f); + int waterToOutput = condenseSteam(totalFlow); addOutput(GT_ModHandler.getDistilledWater(waterToOutput)); - if (totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); - //if(totalFlow>aOptFlow){efficiency = 1.0f;} - tEU *= efficiency; - tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L)); + if (totalFlow == aOptFlow) { + tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L); } else { - tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L); + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float) aOptFlow); + tEU *= efficiency; + tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L)); } return tEU; @@ -154,77 +157,32 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - looseFit^=true; + looseFit ^= true; GT_Utility.sendChatToPlayer(aPlayer, looseFit ? trans("500", "Fitting: Loose - More Flow") : trans("501", "Fitting: Tight - More Efficiency")); } } @Override public int getDamageToComponent(ItemStack aStack) { - return (looseFit && XSTR_INSTANCE.nextInt(4)==0)?0:1; + return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1; } - + @Override public String[] getInfoData() { - super.looseFit = looseFit; - return super.getInfoData(); - } - /* - int mPollutionReduction=0; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); - } - } - - String tRunning = mMaxProgresstime>0 ? - EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET; - String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET : - EnumChatFormatting.RED+"Needs Maintainance"+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)); - } - - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { - if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } - - return new String[]{ - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", // 1 - tMaintainance, // 2 - "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", // 2 - "Stored Energy:" + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ // 3 - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t" + // 4 - EnumChatFormatting.YELLOW+" ("+(looseFit?"Loose":"Tight")+")", // 5 - "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", // 6 - "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", // 7 - "Pollution reduced to: "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" // 8 - }; + super.looseFit = looseFit; + return super.getInfoData(); } - */ - @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setBoolean("turbineFitting",looseFit); + aNBT.setBoolean("turbineFitting", looseFit); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - looseFit=aNBT.getBoolean("turbineFitting"); + looseFit = aNBT.getBoolean("turbineFitting"); } } 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 5eca30def1..3bf7dc4cfb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -1,36 +1,42 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.GT_Values.VN; - -import java.util.ArrayList; - -import org.lwjgl.input.Keyboard; - import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; +import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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 net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.input.Keyboard; -public class GT_MetaTileEntity_MultiFurnace - extends GT_MetaTileEntity_MultiBlockBase { +import java.util.ArrayList; + +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; + +public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMultiFurnace { private int mLevel = 0; private int mCostDiscount = 1; + private static final int CASING_INDEX = 11; + public GT_MetaTileEntity_MultiFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -39,123 +45,108 @@ public class GT_MetaTileEntity_MultiFurnace super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MultiFurnace(this.mName); } + @Override public String[] getDescription() { - final 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-128 items at once") - .addInfo("Items smelted increases with coil tier") - .addPollutionAmount(20 * getPollutionPerTick(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front bottom") - .addCasingInfo("Heat Proof Machine Casing", 8) - .addOtherStructurePart("Heating Coils (any tier)", "Middle layer") - .addEnergyHatch("Any bottom casing") - .addMaintenanceHatch("Any bottom casing") - .addMufflerHatch("Top Middle") - .addInputBus("Any bottom casing") - .addOutputBus("Any bottom casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final 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-128 items at once") + .addInfo("Items smelted increases with coil tier") + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMaintenanceHatch("Any bottom casing") + .addMufflerHatch("Top Middle") + .addInputBus("Any bottom casing") + .addOutputBus("Any bottom casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) + return tt.getInformation(); + return tt.getStructureInformation(); } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11]}; + if (aSide != aFacing) return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; + if (aActive) return new ITexture[]{ + casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_MULTI_SMELTER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).glow().build()}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiFurnace.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sFurnaceRecipes; } - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - + @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tInputList = getStoredInputs(); - if (!tInputList.isEmpty()) { - int mVolatage=GT_Utility.safeInt(getMaxInputVoltage()); - int tMaxParrallel = 8 * this.mLevel; - int tCurrenParrallel = 0; - ItemStack tSmeltStack = tInputList.get(0); - ItemStack tOutputStack = GT_ModHandler.getSmeltingOutput(tSmeltStack,false,null); - if (tOutputStack == null) - return false; - for (int i = 0;i<tInputList.size();i++) - { - ItemStack item = tInputList.get(i); - if (tSmeltStack.isItemEqual(item)) - { - if (item.stackSize<(tMaxParrallel-tCurrenParrallel)) - { - tCurrenParrallel += item.stackSize; - item.stackSize = 0; - } - else - { - item.stackSize = (tCurrenParrallel + item.stackSize) - tMaxParrallel; - tCurrenParrallel = tMaxParrallel; - break; - } - } - } -// this.mOutputItems = new ItemStack[8 * this.mLevel]; -// for (int i = 0; (i < 256) && (j < this.mOutputItems.length); i++) { -// if (null != (this.mOutputItems[j] = GT_ModHandler.getSmeltingOutput((ItemStack) tInputList.get(i % tInputList.size()), true, null))) { -// j++; -// } -// } - tCurrenParrallel *= tOutputStack.stackSize; - this.mOutputItems = new ItemStack[(tCurrenParrallel/64)+1]; - for (int i = 0; i<this.mOutputItems.length;i++) - { - ItemStack tNewStack = tOutputStack.copy(); - int size = tCurrenParrallel>64 ? 64 : tCurrenParrallel; - tNewStack.stackSize = size; - tCurrenParrallel -= size; - this.mOutputItems[i] = tNewStack; + if (tInputList.isEmpty()) + return false; + + int mVolatage = GT_Utility.safeInt(getMaxInputVoltage()); + int tMaxParrallel = 8 * this.mLevel; + int tCurrenParrallel = 0; + ItemStack tSmeltStack = tInputList.get(0); + ItemStack tOutputStack = GT_ModHandler.getSmeltingOutput(tSmeltStack,false,null); + if (tOutputStack == null) + return false; + for (ItemStack item : tInputList) + if (tSmeltStack.isItemEqual(item)) if (item.stackSize < (tMaxParrallel - tCurrenParrallel)) { + tCurrenParrallel += item.stackSize; + item.stackSize = 0; + } else { + item.stackSize = (tCurrenParrallel + item.stackSize) - tMaxParrallel; + tCurrenParrallel = tMaxParrallel; + break; } + tCurrenParrallel *= tOutputStack.stackSize; + this.mOutputItems = new ItemStack[(tCurrenParrallel/64)+1]; + for (int i = 0; i < this.mOutputItems.length; i++) { + ItemStack tNewStack = tOutputStack.copy(); + int size = Math.min(tCurrenParrallel, 64); + tNewStack.stackSize = size; + tCurrenParrallel -= size; + this.mOutputItems[i] = tNewStack; + } - if (this.mOutputItems != null && this.mOutputItems.length > 0) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - calculateOverclockedNessMulti(4, 512, 1, mVolatage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - - this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1); - if (mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - } - updateSlots(); - return true; + if (this.mOutputItems.length > 0) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + calculateOverclockedNessMulti(4, 512, 1, mVolatage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + + this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1); + if (mEUt == Integer.MAX_VALUE - 1) + return false; + + if (this.mEUt > 0) + this.mEUt = (-this.mEUt); } - return false; + updateSlots(); + return true; } private boolean checkMachineFunction(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { @@ -164,167 +155,102 @@ public class GT_MetaTileEntity_MultiFurnace this.mLevel = 0; this.mCostDiscount = 1; - if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) { - return false; - } - addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), 11); + replaceDeprecatedCoils(aBaseMetaTileEntity); - byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir); - switch (tUsedMeta) { - case 0: - this.mLevel = 1; - this.mCostDiscount = 1; - break; - case 1: - this.mLevel = 2; - this.mCostDiscount = 1; - break; - case 2: - this.mLevel = 4; - this.mCostDiscount = 1; - break; - case 3: - this.mLevel = 8; - this.mCostDiscount = 1; - break; - case 4: - this.mLevel = 16; - this.mCostDiscount = 2; - break; - case 5: - this.mLevel = 16; - this.mCostDiscount = 4; - break; - case 6: - this.mLevel = 16; - this.mCostDiscount = 8; - break; - case 7: - this.mLevel = 16; - this.mCostDiscount = 16; - break; - case 8: - this.mLevel = 16; - this.mCostDiscount = 24; - break; - default: - return false; - } - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if ((i != 0) || (j != 0)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != GregTech_API.sBlockCasings5) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings1) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 11) { - return false; - } - } - } - } - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if ((xDir + i != 0) || (zDir + j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); - if ((!addMaintenanceToMachineList(tTileEntity, 11)) && (!addInputToMachineList(tTileEntity, 11)) && (!addOutputToMachineList(tTileEntity, 11)) && (!addEnergyInputToMachineList(tTileEntity, 11))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings1) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 11) { - return false; - } - } - } - } - } + HeatingCoilLevel heatingCap = getInitialHeatLevel(aBaseMetaTileEntity, xDir, zDir); + if (heatingCap == null) + return false; + + if (!checkStructure(heatingCap, xDir, zDir, aBaseMetaTileEntity)) + return false; + + this.mLevel = heatingCap.getLevel(); + this.mCostDiscount = heatingCap.getCostDiscount(); return true; } - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ - boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack); - if (!result) this.mLevel=0; - return result; - } - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } + @Override + protected boolean checkCoils(HeatingCoilLevel heatingCap, int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity) { + if ((i == 0) && (j == 0)) + return aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir); + + Block coilM = aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j); + if (!(coilM instanceof IHeatingCoil)) + return false; + byte usedMetaM = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j); + + IHeatingCoil heatingCoilM = (IHeatingCoil) coilM; + HeatingCoilLevel heatingLevelM = heatingCoilM.getCoilHeat(usedMetaM); - public int getPollutionPerTick(ItemStack aStack) { - return 20; + return heatingLevelM == heatingCap; } - public int getDamageToComponent(ItemStack aStack) { - return 0; + @Override + protected boolean checkTopLayer(int i, int j, int xDir, int zDir, IGregTechTileEntity aBaseMetaTileEntity) { + if ((i == 0) && (j == 0)) { + return addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), CASING_INDEX); + } + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != GregTech_API.sBlockCasings1) + return false; + return aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) == CASING_INDEX; } - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ + return this.checkMachineFunction(aBaseMetaTileEntity,aStack); } private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int tX = aBaseMetaTileEntity.getXCoord() + xDir; - int tY = (int) aBaseMetaTileEntity.getYCoord(); + int tY = aBaseMetaTileEntity.getYCoord(); int tZ = aBaseMetaTileEntity.getZCoord() + zDir; int tUsedMeta; - for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { + for (int xPos = tX - 1; xPos <= tX + 1; xPos++) for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { - if ((xPos == tX) && (zPos == tZ)) { - continue; - } + 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) { + 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) { + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } - } return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress")+": "+ - EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", - StatCollector.translateToLocal("GT5U.multiblock.energy")+": "+ - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - StatCollector.translateToLocal("GT5U.multiblock.usage")+": "+ - EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei")+": "+ - EnumChatFormatting.YELLOW+Long.toString(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+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.MS.multismelting")+": "+ - EnumChatFormatting.GREEN+mLevel*8+EnumChatFormatting.RESET+" Discount: (EU/t) / "+EnumChatFormatting.GREEN+mCostDiscount+EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.pollution")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + -mEUt + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + getMaxInputVoltage() + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier") + ": " + + EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + StatCollector.translateToLocal("GT5U.MS.multismelting") + ": " + + EnumChatFormatting.GREEN + mLevel * 8 + EnumChatFormatting.RESET + " Discount: (EU/t) / " + EnumChatFormatting.GREEN + mCostDiscount + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } 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 e4ad65e4a4..0a0088246b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -1,32 +1,44 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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 net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.mutable.MutableInt; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; +import java.util.BitSet; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBase { private ForgeDirection orientation; private int controllerX, controllerZ; + private static final byte CASING_INDEX = 49; + private HeatingCoilLevel heatLevel; + public GT_MetaTileEntity_OilCracker(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -35,40 +47,45 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa super(aName); } + @Override public String[] getDescription() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - 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("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 Cupronickel Coils", "Each side of the controller") - .addEnergyHatch("Any casing") - .addMaintenanceHatch("Any casing") - .addInputHatch("Steam/Hydrogen, Any middle ring casing") - .addInputHatch("Any left/right side casing") - .addOutputHatch("Any left/right side casing") - .addStructureInfo("Input/Output Hatches must be on opposite sides!") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + 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("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 5% energy cost reduction per coil tier") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputHatch("Steam/Hydrogen, Any middle ring casing") + .addInputHatch("Any left/right side casing") + .addOutputHatch("Any left/right side casing") + .addStructureInfo("Input/Output Hatches must be on opposite sides!") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) return tt.getInformation(); + return tt.getStructureInformation(); } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][49], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER)}; + if (aActive) return new ITexture[]{casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_OIL_CRACKER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{casingTexturePages[0][CASING_INDEX], + TextureFactory.of(OVERLAY_FRONT_OIL_CRACKER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).glow().build()}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][49]}; + return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OilCrackingUnit.png"); } @@ -76,13 +93,22 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<FluidStack> tInputList = getStoredFluids(); - FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[tInputList.size()]); + FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[0]); long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCrakingRecipes.findRecipe( - getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidInputs ,new ItemStack[]{mInventory[1]}); - if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluidInputs, new ItemStack[]{mInventory[1]})) { + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + tFluidInputs , + mInventory[1] + ); + + if (tRecipe == null) + return false; + + if (tRecipe.isRecipeInputEqual(true, tFluidInputs, mInventory[1])) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; this.mEUt = tRecipe.mEUt; @@ -91,147 +117,153 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa this.mEUt *= 4; this.mMaxProgresstime /= 2; } - if (this.mEUt > 0) { + + this.mEUt *= Math.pow(0.95D, this.heatLevel.getTier()); + + if (this.mEUt > 0) this.mEUt = (-this.mEUt); - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; return true; } return false; } + private boolean coilsNotPresent(IGregTechTileEntity aBaseMetaTileEntity, int x , int y, int z) { + + Block coil = aBaseMetaTileEntity.getBlockOffset(x, y, z); + + if (!(coil instanceof IHeatingCoil)) + return true; + + IHeatingCoil heatingCoil = (IHeatingCoil) coil; + byte meta = aBaseMetaTileEntity.getMetaIDOffset(x, y, z); + HeatingCoilLevel heatLevel = heatingCoil.getCoilHeat(meta); + if (heatLevel == HeatingCoilLevel.None) + return true; + + if (this.heatLevel == HeatingCoilLevel.None) + this.heatLevel = heatLevel; + + return this.heatLevel != heatLevel; + } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + this.heatLevel = HeatingCoilLevel.None; this.orientation = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); this.controllerX = aBaseMetaTileEntity.getXCoord(); this.controllerZ = aBaseMetaTileEntity.getZCoord(); int xDir = this.orientation.offsetX; int zDir = this.orientation.offsetZ; - int amount = 0; + MutableInt amount = new MutableInt(0); replaceDeprecatedCoils(aBaseMetaTileEntity); - boolean negSideInput = false, negSideOutput = false, posSideInput = false, posSideOutput = false; - if (xDir != 0) { - for (int i = -1; i < 2; i++) {// xDirection - for (int j = -1; j < 2; j++) {// height - for (int h = -2; h < 3; h++) { - if (!(j == 0 && i == 0 && (h == -1 || h == 0 || h == 1))) { - if (h == 1 || h == -1) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings5) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 0) { - return false; - } - } - if (h == 2 || h == -2) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir); - if (addInputToMachineList(tTileEntity, 49)) { - if (h == -2) { - negSideInput = true; - } else { - posSideInput = true; - } - } else if (addOutputToMachineList(tTileEntity, 49)) { - if (h == -2) { - negSideOutput = true; - } else { - posSideOutput = true; - } - } else if (!addEnergyInputToMachineList(tTileEntity, 49) && !addMaintenanceToMachineList(tTileEntity, 49)){ - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings4) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 1) { - return false; - } - amount++; - } - } - if (h == 0) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir); - if ((!addMaintenanceToMachineList(tTileEntity, 49)) && (!addInputToMachineList(tTileEntity, 49)) - && (!addEnergyInputToMachineList(tTileEntity, 49))) { - if (!((xDir + i) == 0 && j == 0 && (h + zDir) == 0)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings4) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 1) { - return false; - } - amount++; - } - } - } - - } - } - } - } - } else { - for (int i = -1; i < 2; i++) {// zDirection - for (int j = -1; j < 2; j++) {// height - for (int h = -2; h < 3; h++) { - if (!(j == 0 && i == 0 && (h == -1 || h == 0 || h == 1))) { - if (h == 1 || h == -1) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings5) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 0) { - return false; - } - } - if (h == 2 || h == -2) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir); - if (addInputToMachineList(tTileEntity, 49)) { - if (h == -2) { - negSideInput = true; - } else { - posSideInput = true; - } - } else if (addOutputToMachineList(tTileEntity, 49)) { - if (h == -2) { - negSideOutput = true; - } else { - posSideOutput = true; - } - } else if (!addEnergyInputToMachineList(tTileEntity, 49) && !addMaintenanceToMachineList(tTileEntity, 49)){ - if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings4) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 1) { - return false; - } - amount++; - } - } - if (h == 0) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir); - if ((!addMaintenanceToMachineList(tTileEntity, 49)) && (!addInputToMachineList(tTileEntity, 49)) - && (!addEnergyInputToMachineList(tTileEntity, 49))) { - if (!((xDir + h) == 0 && j == 0 && (i + zDir) == 0)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings4) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 1) { - return false; - } - amount++; - } - } - } - - } + BitSet flags = new BitSet(4); + + for (int depth = -1; depth < 2; depth++) + for (int height = -1; height < 2; height++) + for (int slice = -2; slice < 3; slice++) + if (xDir == 0) { + if (isStructureBroken(xDir, zDir, slice, height, depth, aBaseMetaTileEntity, amount, flags)) + return false; + } else { + if (isStructureBroken(xDir, zDir, depth, height, slice, aBaseMetaTileEntity, amount, flags)) + return false; } - } - } + + if(checkInputOutputBroken(flags)) + return false; + + return amount.intValue() >= 18; + } + + private boolean checkInputOutputBroken(BitSet flags){ + if (flags.get(0) && flags.get(2)) //input and output on side 1 + return true; + if (flags.get(1) && flags.get(3)) //input and output on side 2 + return true; + if (flags.get(1) && flags.get(2)) //input on both sides + return true; + return flags.get(2) && flags.get(3); //output on both sides + } + + private boolean isStructureBroken( + int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + MutableInt amount, + BitSet flags) { + if (b == 0 && c == 0 && (a == -1 || a == 0 || a == 1)) + return false; + if (a == 1 || a == -1) { + return coilsNotPresent(aBaseMetaTileEntity, xDir + a, b, c + zDir); } - if ((negSideInput && negSideOutput) || (posSideInput && posSideOutput) - || (negSideInput && posSideInput) || (negSideOutput && posSideOutput)) { - return false; + else if (a == 2 || a == -2) { + return checkEndsBroken(xDir, zDir, a, b, c, aBaseMetaTileEntity, amount, flags); } - if (amount < 18) return false; - return true; + else if (a == 0) + return checkMiddleBroken(xDir, zDir, a, b, c, aBaseMetaTileEntity, amount); + + return false; + } + + private boolean checkEndsBroken( + int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + MutableInt amount, + BitSet flags + ){ + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + c, b, a + zDir); + if (addInputToMachineList(tTileEntity, CASING_INDEX)) + if (a == -2) + flags.set(0); //input on side 1 + else + flags.set(1); //input on side 2 + else if (addOutputToMachineList(tTileEntity, CASING_INDEX)) + if (a == -2) + flags.set(2); //output on side 1 + else + flags.set(3); //output on side 2 + else if (!addEnergyInputToMachineList(tTileEntity, CASING_INDEX)) + if (!addMaintenanceToMachineList(tTileEntity, CASING_INDEX)) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + c, b, a + zDir) != GregTech_API.sBlockCasings4) + return true; + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + c, b, a + zDir) != 1) + return true; + amount.increment(); + } + return false; + } + + private boolean checkMiddleBroken( int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + MutableInt amount){ + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + c, b, a + zDir); + if (addMaintenanceToMachineList(tTileEntity, CASING_INDEX)) + return false; + if (addInputToMachineList(tTileEntity, CASING_INDEX)) + return false; + if (addEnergyInputToMachineList(tTileEntity, CASING_INDEX)) + return false; + if ((xDir + c) == 0 && b == 0 && (a + zDir) == 0) + return false; + if (aBaseMetaTileEntity.getBlockOffset(xDir + c, b, a + zDir) != GregTech_API.sBlockCasings4) + return true; + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + c, b, a + zDir) != 1) + return true; + amount.increment(); + return false; } @Override @@ -259,6 +291,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa return false; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_OilCracker(this.mName); } @@ -267,50 +300,52 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int tX = aBaseMetaTileEntity.getXCoord() + xDir; - int tY = (int) aBaseMetaTileEntity.getYCoord(); + int tY = aBaseMetaTileEntity.getYCoord(); int tZ = aBaseMetaTileEntity.getZCoord() + zDir; - for (int xPos = tX - 1; xPos <= tX + 1; xPos += (xDir != 0 ? 1 : 2)) { - for (int yPos = tY - 1; yPos <= tY + 1; yPos++) { + for (int xPos = tX - 1; xPos <= tX + 1; xPos += (xDir != 0 ? 1 : 2)) + for (int yPos = tY - 1; yPos <= tY + 1; yPos++) for (int zPos = tZ - 1; zPos <= tZ + 1; zPos += (xDir != 0 ? 2 : 1)) { - if ((yPos == tY) && (xPos == tX || zPos == tZ)) { + if ((yPos == tY) && (xPos == tX || zPos == tZ)) continue; - } - if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) == GregTech_API.sBlockCasings1 && - aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos) == 12) - { - aBaseMetaTileEntity.getWorld().setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, 0, 3); - } + byte tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); + if (tUsedMeta < 12) + continue; + if (tUsedMeta > 14) + continue; + if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) + continue; + + aBaseMetaTileEntity.getWorld().setBlock( + xPos, + yPos, + zPos, + GregTech_API.sBlockCasings5, + tUsedMeta - 12, + 3 + ); } - } - } } @Override public ArrayList<FluidStack> getStoredFluids() { - ArrayList<FluidStack> rList = new ArrayList<FluidStack>(); + ArrayList<FluidStack> rList = new ArrayList<>(); for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { FluidStack tStack = tHatch.getFillableStack(); if (tStack.isFluidEqual(GT_ModHandler.getSteam(1000)) || tStack.isFluidEqual(Materials.Hydrogen.getGas(1000))) { - if (isHatchInMiddleRing(tHatch)) { - rList.add(tStack); - } - } else { - if (!isHatchInMiddleRing(tHatch)) { + if (isHatchInMiddleRing(tHatch)) rList.add(tStack); - } - } + } else if (!isHatchInMiddleRing(tHatch)) + rList.add(tStack); } } return rList; } private boolean isHatchInMiddleRing(GT_MetaTileEntity_Hatch_Input inputHatch){ - if (orientation == ForgeDirection.NORTH || orientation == ForgeDirection.SOUTH) { + if (orientation == ForgeDirection.NORTH || orientation == ForgeDirection.SOUTH) return inputHatch.getBaseMetaTileEntity().getXCoord() == this.controllerX; - } else { - return inputHatch.getBaseMetaTileEntity().getZCoord() == this.controllerZ; - } + return inputHatch.getBaseMetaTileEntity().getZCoord() == this.controllerZ; } -}
\ No newline at end of file +} 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 750978a3c3..73d8131fed 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 @@ -48,4 +48,4 @@ public class GT_MetaTileEntity_OilDrill1 extends GT_MetaTileEntity_OilDrillBase protected int getMinTier() { return 2; } -}
\ No newline at end of file +} 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 d0b366b995..9d36b340d3 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 @@ -48,4 +48,4 @@ public class GT_MetaTileEntity_OilDrill2 extends GT_MetaTileEntity_OilDrillBase protected int getMinTier() { return 3; } -}
\ No newline at end of file +} 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 3ebb67f5b7..8ebc658406 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 @@ -48,4 +48,4 @@ public class GT_MetaTileEntity_OilDrill3 extends GT_MetaTileEntity_OilDrillBase protected int getMinTier() { return 4; } -}
\ No newline at end of file +} 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 a7a7023d34..44fb734534 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java @@ -1,7 +1,10 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +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; @@ -9,26 +12,29 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; - import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.GT_Values.debugDriller; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; import static gregtech.common.GT_UndergroundOil.undergroundOil; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_DrillerBase { - - private boolean completedCycle = false; - - private ArrayList<Chunk> mOilFieldChunks = new ArrayList<Chunk>(); + private final ArrayList<Chunk> mOilFieldChunks = new ArrayList<>(); private int mOilId = 0; private int chunkRangeConfig = getRangeInChunks(); @@ -42,6 +48,21 @@ 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) { + if (aSide == aFacing) { + if (aActive) return new ITexture[]{ + getCasingTextureForId(casingTextureIndex), + TextureFactory.of(OVERLAY_FRONT_OIL_DRILL_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + getCasingTextureForId(casingTextureIndex), + TextureFactory.of(OVERLAY_FRONT_OIL_DRILL), + TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).glow().build()}; + } + return new ITexture[]{getCasingTextureForId(casingTextureIndex)}; + } + + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("mOilId", mOilId); @@ -58,30 +79,30 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D protected String[] getDescriptionInternal(String tierSuffix) { 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 Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : "")) - .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks") - .addInfo("Use a Screwdriver to configure range") - .addInfo("Use Programmed Circuits to ignore near exhausted oil field") - .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.")//doesn't work - .addSeparator() - .beginStructureBlock(3, 7, 3, false) - .addController("Front bottom") - .addStructureInfo(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") - .addMaintenanceHatch("Any base casing") - .addInputBus("Mining Pipes or Circuits, optional, any base casing") - .addOutputHatch("Any base casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + tt.addMachineType("Pump") + .addInfo("Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : "")) + .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks") + .addInfo("Use a Screwdriver to configure range") + .addInfo("Use Programmed Circuits to ignore near exhausted oil field") + .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.")//doesn't work + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addStructureInfo(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") + .addMaintenanceHatch("Any base casing") + .addInputBus("Mining Pipes or Circuits, optional, any base casing") + .addOutputHatch("Any base casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } @@ -95,6 +116,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + int oldChunkRange = chunkRangeConfig; if (aPlayer.isSneaking()) { if (chunkRangeConfig > 0) { chunkRangeConfig--; @@ -108,6 +130,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D if (chunkRangeConfig > getRangeInChunks()) chunkRangeConfig = 1; } + if (oldChunkRange != chunkRangeConfig) mOilFieldChunks.clear(); GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + chunkRangeConfig + "x" + chunkRangeConfig + StatCollector.translateToLocal("GT5U.machines.chunks"));//TODO Add translation support } @@ -137,6 +160,11 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D } if (reachingVoidOrBedrock() && tryFillChunkList()) { + if (mWorkChunkNeedsReload) { + mCurrentChunk = new ChunkCoordIntPair(xDrill >> 4, zDrill >> 4); + GT_ChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), null); + mWorkChunkNeedsReload = false; + } float speed = .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) *.25F; FluidStack tFluid = pumpOil(speed); if (tFluid != null && tFluid.amount > getTotalConfigValue()){ @@ -144,6 +172,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D return true; } } + GT_ChunkManager.releaseTicket((TileEntity)getBaseMetaTileEntity()); workState = STATE_UPWARD; return true; } @@ -220,7 +249,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D ); } - ArrayList<Chunk> emptyChunks = new ArrayList<Chunk>(); + ArrayList<Chunk> emptyChunks = new ArrayList<>(); for (Chunk tChunk : mOilFieldChunks) { tFluid = undergroundOil(tChunk,speed); 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 f74748a364..d23ce2edd0 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 @@ -55,4 +55,4 @@ public class GT_MetaTileEntity_OreDrillingPlant1 extends GT_MetaTileEntity_OreDr protected int getBaseProgressTime() { return 960; } -}
\ No newline at end of file +} 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 e34ed7466f..224f1de557 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 @@ -4,7 +4,6 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.IChunkLoader; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ChunkManager; import gregtech.api.objects.ItemData; @@ -37,7 +36,7 @@ import org.lwjgl.input.Keyboard; import static gregtech.api.enums.GT_Values.VN; -public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_DrillerBase implements IChunkLoader { +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(); @@ -64,9 +63,6 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } @Override - public ChunkCoordIntPair getActiveChunk(){return mCurrentChunk;} - - @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OreDrillingPlant.png"); } @@ -327,7 +323,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(x, y, z); if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) oreBlockPositions.add(blockPos); - } else if (GT_Utility.isOre(new ItemStack(block, 1, blockMeta))) + } else if (GT_Utility.isOre(block, blockMeta)) oreBlockPositions.add(blockPos); } } 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 eeeef95dc3..f1b304a1b1 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 @@ -7,6 +7,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_PrimitiveBlastFurnace; import gregtech.common.gui.GT_GUIContainer_PrimitiveBlastFurnace; @@ -18,6 +19,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.input.Keyboard; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; @@ -44,65 +46,81 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn super(aName, INPUT_SLOTS + OUTPUT_SLOTS); } + @Override public boolean isSteampowered() { return false; } + @Override public boolean isElectric() { return false; } + @Override public boolean isPneumatic() { return false; } + @Override public boolean isEnetInput() { return false; } + @Override public boolean isEnetOutput() { return false; } + @Override public boolean isInputFacing(byte aSide) { return false; } + @Override public boolean isOutputFacing(byte aSide) { return false; } + @Override public boolean isTeleporterCompatible() { return false; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean isAccessAllowed(EntityPlayer aPlayer) { return true; } + @Override public int getProgresstime() { return this.mProgresstime; } + @Override public int maxProgresstime() { return this.mMaxProgresstime; } + @Override public int increaseProgress(int aProgress) { this.mProgresstime += aProgress; return this.mMaxProgresstime - this.mProgresstime; } + @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); } - public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity); + @Override + public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity); + @Override public void saveNBTData(NBTTagCompound aNBT) { aNBT.setInteger("mProgresstime", this.mProgresstime); aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); @@ -117,6 +135,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } } + @Override public void loadNBTData(NBTTagCompound aNBT) { this.mUpdate = 5; this.mProgresstime = aNBT.getInteger("mProgresstime"); @@ -127,6 +146,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } } + @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { return true; @@ -135,11 +155,13 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn return true; } + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_PrimitiveBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); } - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_PrimitiveBlastFurnace(aPlayerInventory, aBaseMetaTileEntity, getName(), GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.mNEIName); } @@ -170,16 +192,25 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn protected abstract boolean isCorrectCasingMetaID(int metaID); + @Override public void onMachineBlockUpdate() { this.mUpdate = 5; } + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - aBaseMetaTileEntity.getWorld().spawnParticle("largesmoke", - aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + XSTR_INSTANCE.nextFloat(), - aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), - aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + XSTR_INSTANCE.nextFloat(), 0.0D, 0.3D, 0.0D); + + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setMotion(0D,0.3D,0D) + .setIdentifier("largesmoke") + .setPosition( + aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + XSTR_INSTANCE.nextFloat(), + aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + XSTR_INSTANCE.nextFloat() + ) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } if (aBaseMetaTileEntity.isServerSide()) { if (this.mUpdate-- == 0) { @@ -300,21 +331,30 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn return true; } + @Override public boolean isGivingInformation() { return false; } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aIndex > INPUT_SLOTS; } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); } + @Override public byte getTileEntityBaseType() { return 0; } public abstract String getName(); + + @Override + public boolean isDisplaySecondaryDescription() { + return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); + } } 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 2496d02a42..684cead86c 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 @@ -4,6 +4,7 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -11,7 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_ProcessingArray_Manager; import gregtech.api.util.GT_Recipe; @@ -34,6 +35,10 @@ import java.util.Collections; import java.util.List; import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_GLOW; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.isValidForLowGravity; public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBlockBase { @@ -51,45 +56,56 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ProcessingArray(this.mName); } + @Override public String[] getDescription() { - 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") - .addInfo("Place up to 64 singleblock GT machines into the controller") - .addInfo("Note that tou still need to supply power to them all") - .addInfo("Use a screwdriver to enable separate input busses") - .addInfo("Maximal overclockedness of machines inside: Tier 9") - .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") - .addMaintenanceHatch("Any casing") - .addInputBus("Any casing") - .addInputHatch("Any casing") - .addOutputBus("Any casing") - .addOutputHatch("Any casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + 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") + .addInfo("Place up to 64 singleblock GT machines into the controller") + .addInfo("Note that tou still need to supply power to them all") + .addInfo("Use a screwdriver to enable separate input busses") + .addInfo("Maximal overclockedness of machines inside: Tier 9") + .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") + .addMaintenanceHatch("Any casing") + .addInputBus("Any casing") + .addInputHatch("Any casing") + .addOutputBus("Any casing") + .addOutputHatch("Any casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][48], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY)}; + if (aActive) return new ITexture[]{ + BlockIcons.casingTexturePages[0][48], + TextureFactory.of(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.casingTexturePages[0][48], + TextureFactory.of(OVERLAY_FRONT_PROCESSING_ARRAY), + TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][48]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png"); } @@ -117,28 +133,27 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl } */ + @Override public GT_Recipe_Map getRecipeMap() { if (isCorrectMachinePart(mInventory[1])) { - GT_Recipe_Map aTemp = GT_ProcessingArray_Manager.getRecipeMapForMeta(mInventory[1].getItemDamage()); - if (aTemp != null) { - return aTemp; - } + return GT_ProcessingArray_Manager.getRecipeMapForMeta(mInventory[1].getItemDamage()); } return null; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { - if (aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { - return true; - } - return false; + return aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine."); } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } private String mMachine = ""; + + @Override public boolean checkRecipe(ItemStack aStack) { if (!isCorrectMachinePart(mInventory[1])) { return false; @@ -146,174 +161,173 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl GT_Recipe.GT_Recipe_Map map = getRecipeMap(); if (map == null) return false; - if (mInventory[1].getUnlocalizedName().endsWith("10")) { - tTier = 9; - mMult = 2;//u need 4x less machines and they will use 4x less power - } else if (mInventory[1].getUnlocalizedName().endsWith("11")) { - tTier = 9; - mMult = 4;//u need 16x less machines and they will use 16x less power - } else if (mInventory[1].getUnlocalizedName().endsWith("12") || - mInventory[1].getUnlocalizedName().endsWith("13") || - mInventory[1].getUnlocalizedName().endsWith("14") || - mInventory[1].getUnlocalizedName().endsWith("15")) { - tTier = 9; - mMult = 6;//u need 64x less machines and they will use 64x less power - } else if (mInventory[1].getUnlocalizedName().endsWith("1")) { - tTier = 1; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("2")) { - tTier = 2; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("3")) { - tTier = 3; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("4")) { - tTier = 4; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("5")) { - tTier = 5; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("6")) { - tTier = 6; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("7")) { - tTier = 7; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("8")) { - tTier = 8; - mMult = 0;//*1 - } else if (mInventory[1].getUnlocalizedName().endsWith("9")) { - tTier = 9; - mMult = 0;//*1 - } else { - tTier = 0; - mMult = 0;//*1 + if (!mMachine.equals(mInventory[1].getUnlocalizedName())) { + mLastRecipe = null; + mMachine = mInventory[1].getUnlocalizedName(); } - if (!mMachine.equals(mInventory[1].getUnlocalizedName())) mLastRecipe = null; - mMachine = mInventory[1].getUnlocalizedName(); + int machineTier = 0; + + if (mLastRecipe == null) { + try { + int length = mMachine.length(); + + machineTier = Integer.parseInt(mMachine.substring(length - 2)); + + } catch (NumberFormatException ignored) { + /* do nothing */ + } + + switch (machineTier) { + default: + tTier = 0; + mMult = 0;//*1 + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + tTier = machineTier; + mMult = 0;//*1 + break; + case 10: + tTier = 9; + mMult = 2;//u need 4x less machines and they will use 4x less power + break; + case 11: + tTier = 9; + mMult = 4;//u need 16x less machines and they will use 16x less power + break; + case 12: + case 13: + case 14: + case 15: + tTier = 9; + mMult = 6;//u need 64x less machines and they will use 64x less power + break; + } + } ArrayList<FluidStack> tFluidList = getStoredFluids(); - FluidStack[] tFluids = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]); + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); if (mSeparate) { - ArrayList<ItemStack> tInputList = new ArrayList<ItemStack>(); - for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) { - IGregTechTileEntity tInpuBus = tHatch.getBaseMetaTileEntity(); - for (int i = tInpuBus.getSizeInventory() - 1; i >= 0; i--) { - if (tInpuBus.getStackInSlot(i) != null) - tInputList.add(tInpuBus.getStackInSlot(i)); - } - ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]); - if (processRecipe(tInputs, tFluids, map)) - return true; - else - tInputList.clear(); - } + ArrayList<ItemStack> tInputList = new ArrayList<>(); + for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) { + IGregTechTileEntity tInputBus = tHatch.getBaseMetaTileEntity(); + for (int i = tInputBus.getSizeInventory() - 1; i >= 0; i--) { + if (tInputBus.getStackInSlot(i) != null) + tInputList.add(tInputBus.getStackInSlot(i)); + } + ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); + if (processRecipe(tInputs, tFluids, map)) + return true; + else + tInputList.clear(); + } } else { - ArrayList<ItemStack> tInputList = getStoredInputs(); - ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]); + ArrayList<ItemStack> tInputList = getStoredInputs(); + ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); return processRecipe(tInputs, tFluids, map); } return false; } public boolean processRecipe(ItemStack[] tInputs, FluidStack[] tFluids, GT_Recipe.GT_Recipe_Map map) { - if (tInputs.length > 0 || tFluids.length > 0) { - GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - if (tRecipe != null) { - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && - !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) - return false; + 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); + if (tRecipe == null) return false; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && + !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) + return false; - mLastRecipe = tRecipe; - this.mEUt = 0; - this.mOutputItems = null; - this.mOutputFluids = null; - int machines = Math.min(64, mInventory[1].stackSize << mMult); //Upped max Cap to 64 - int i = 0; - for (; i < machines; i++) { - if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { - if (i == 0) { - return false; - } - break; - } - } - this.mMaxProgresstime = tRecipe.mDuration; - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, map.mAmperage, GT_Values.V[tTier]); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - this.mEUt = GT_Utility.safeInt(((long) this.mEUt * i) >> mMult, 1); - if (mEUt == Integer.MAX_VALUE - 1) + mLastRecipe = tRecipe; + this.mEUt = 0; + this.mOutputItems = null; + this.mOutputFluids = null; + int machines = Math.min(64, mInventory[1].stackSize << mMult); //Upped max Cap to 64 + int i = 0; + for (; i < machines; i++) { + if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { + if (i == 0) { return false; - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOut[h] = tRecipe.getOutput(h).copy(); - tOut[h].stackSize = 0; - } - } - FluidStack tFOut = null; - if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy(); - for (int f = 0; f < tOut.length; f++) { - if (tRecipe.mOutputs[f] != null && tOut[f] != null) { - for (int g = 0; g < i; g++) { - if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) - tOut[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } } - if (tFOut != null) { - int tSize = tFOut.amount; - tFOut.amount = tSize * i; - } - tOut = clean(tOut); - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - List<ItemStack> overStacks = new ArrayList<ItemStack>(); - for (int f = 0; f < tOut.length; f++) { - while (tOut[f].getMaxStackSize() < tOut[f].stackSize) { - if (tOut[f] != null) { - ItemStack tmp = tOut[f].copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize(); - overStacks.add(tmp); - } - } - } - if (overStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[overStacks.size()]; - tmp = overStacks.toArray(tmp); - tOut = ArrayUtils.addAll(tOut, tmp); - } - List<ItemStack> tSList = new ArrayList<ItemStack>(); - for (ItemStack tS : tOut) { - if (tS.stackSize > 0) tSList.add(tS); + break; + } + } + this.mMaxProgresstime = tRecipe.mDuration; + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, map.mAmperage, GT_Values.V[tTier]); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + this.mEUt = GT_Utility.safeInt(((long) this.mEUt * i) >> mMult, 1); + if (mEUt == Integer.MAX_VALUE - 1) + return false; + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOut[h] = tRecipe.getOutput(h).copy(); + tOut[h].stackSize = 0; + } + } + FluidStack tFOut = null; + if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy(); + for (int f = 0; f < tOut.length; f++) { + if (tRecipe.mOutputs[f] != null && tOut[f] != null) { + for (int g = 0; g < i; g++) { + if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) + tOut[f].stackSize += tRecipe.mOutputs[f].stackSize; } - tOut = tSList.toArray(new ItemStack[tSList.size()]); - this.mOutputItems = tOut; - this.mOutputFluids = new FluidStack[]{tFOut}; - updateSlots(); - return true; - }/* else{ - ...remoteRecipeCheck() - }*/ + } + } + if (tFOut != null) { + int tSize = tFOut.amount; + tFOut.amount = tSize * i; + } + tOut = clean(tOut); + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + List<ItemStack> overStacks = new ArrayList<>(); + for (ItemStack itemStack : tOut) { + while (itemStack != null && itemStack.getMaxStackSize() < itemStack.stackSize) { + ItemStack tmp = itemStack.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + itemStack.stackSize = itemStack.stackSize - itemStack.getMaxStackSize(); + overStacks.add(tmp); + } } - return false; + if (!overStacks.isEmpty()) { + ItemStack[] tmp = new ItemStack[overStacks.size()]; + tmp = overStacks.toArray(tmp); + tOut = ArrayUtils.addAll(tOut, tmp); + } + List<ItemStack> tSList = new ArrayList<>(); + for (ItemStack tS : tOut) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOut = tSList.toArray(new ItemStack[0]); + this.mOutputItems = tOut; + this.mOutputFluids = new FluidStack[]{tFOut}; + updateSlots(); + return true; } public static ItemStack[] clean(final ItemStack[] v) { - List<ItemStack> list = new ArrayList<ItemStack>(Arrays.asList(v)); + List<ItemStack> list = new ArrayList<>(Arrays.asList(v)); list.removeAll(Collections.singleton(null)); - return list.toArray(new ItemStack[list.size()]); + return list.toArray(new ItemStack[0]); } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -344,34 +358,38 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl @Override public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mSeparate", mSeparate); + super.saveNBTData(aNBT); + aNBT.setBoolean("mSeparate", mSeparate); } @Override - public void loadNBTData(final NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mSeparate = aNBT.getBoolean("mSeparate"); + public void loadNBTData(final NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mSeparate = aNBT.getBoolean("mSeparate"); } @Override - 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); + 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); } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } @@ -389,26 +407,26 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl } return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress")+": "+ - EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", - StatCollector.translateToLocal("GT5U.multiblock.energy")+": "+ - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - StatCollector.translateToLocal("GT5U.multiblock.usage")+": "+ - EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei")+": "+ - EnumChatFormatting.YELLOW+Long.toString(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+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.PA.machinetier")+": "+ - EnumChatFormatting.GREEN+tTier+EnumChatFormatting.RESET+ - " "+StatCollector.translateToLocal("GT5U.PA.discount")+": "+ - EnumChatFormatting.GREEN+(1<<mMult)+EnumChatFormatting.RESET + " x", - StatCollector.translateToLocal("GT5U.PA.parallel")+": "+EnumChatFormatting.GREEN+((mInventory[1] != null) ? (mInventory[1].stackSize<<mMult) : 0)+EnumChatFormatting.RESET + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + -mEUt + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + 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.PA.machinetier") + ": " + + EnumChatFormatting.GREEN + tTier + EnumChatFormatting.RESET + + " " + StatCollector.translateToLocal("GT5U.PA.discount") + ": " + + EnumChatFormatting.GREEN + (1 << mMult) + EnumChatFormatting.RESET + " x", + StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + EnumChatFormatting.GREEN + ((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + EnumChatFormatting.RESET }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index c2e13a815f..701a81b6ba 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 @@ -3,13 +3,16 @@ package gregtech.common.tileentities.machines.multi; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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; @@ -20,17 +23,19 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.Arrays; - +import org.apache.commons.lang3.mutable.MutableBoolean; import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_GLOW; + public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase { - - private int coilMetaID; - //public static GT_CopiedBlockTexture mTextureULV = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0, Dyes.MACHINE_METAL.mRGBa); - private final int CASING_INDEX = 1090; + + 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; public GT_MetaTileEntity_PyrolyseOven(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -40,181 +45,149 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock super(aName); } + @Override public String[] getDescription() { - 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:") - .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.") - .addInfo("EU/t is not affected by Coil tier") - .addPollutionAmount(20 * getPollutionPerTick(null)) - .addSeparator() - .beginStructureBlock(5, 4, 5, true) - .addController("Front center") - .addCasingInfo("Pyrolyse Oven Casing", 60) - .addOtherStructurePart("Heating Coils (any tier)", "Center 3x1x3 of the bottom layer") - .addEnergyHatch("Any bottom layer casing") - .addMaintenanceHatch("Any bottom layer casing") - .addMufflerHatch("Center 3x1x3 area in top layer") - .addInputBus("Center 3x1x3 area in top layer") - .addInputHatch("Center 3x1x3 area in top layer") - .addOutputBus("Any bottom layer casing") - .addOutputHatch("Any bottom layer casing") - .toolTipFinisher("Gregtech"); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return tt.getInformation(); - } else { - return tt.getStructureInformation(); - } + 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:") + .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.") + .addInfo("EU/t is not affected by Coil tier") + .addPollutionAmount(20 * getPollutionPerTick(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") + .addMaintenanceHatch("Any bottom layer casing") + .addMufflerHatch("Center 3x1x3 area in top layer") + .addInputBus("Center 3x1x3 area in top layer") + .addInputHatch("Center 3x1x3 area in top layer") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("Any bottom layer casing") + .toolTipFinisher("Gregtech"); + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getStructureInformation(); + } else { + return tt.getInformation(); + } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[8][66], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN)}; + if (aActive) + return new ITexture[]{ + BlockIcons.casingTexturePages[8][66], + TextureFactory.of(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).glow().build()}; + return new ITexture[]{ + BlockIcons.casingTexturePages[8][66], + TextureFactory.of(OVERLAY_FRONT_PYROLYSE_OVEN), + TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).glow().build()}; } return new ITexture[]{Textures.BlockIcons.casingTexturePages[8][66]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "PyrolyseOven.png"); } @Override public boolean checkRecipe(ItemStack aStack) { - ArrayList<ItemStack> tInputList = getStoredInputs(); - int tInputList_sS=tInputList.size(); - for (int i = 0; i < tInputList_sS - 1; i++) { - for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { - if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { - tInputList.remove(j--); tInputList_sS=tInputList.size(); - } else { - tInputList.remove(i--); tInputList_sS=tInputList.size(); - break; - } - } - } - } - ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2); - - ArrayList<FluidStack> tFluidList = getStoredFluids(); - int tFluidList_sS=tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) { - if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) { - tFluidList.remove(j--); tFluidList_sS=tFluidList.size(); - } else { - tFluidList.remove(i--); tFluidList_sS=tFluidList.size(); - break; - } - } - } - } - FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1); - if (tInputList.size() > 0) { - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - - //Dynamic recipe adding for newly found logWoods - wont be visible in nei most probably - if(tRecipe==null){ - for(ItemStack is:tInputs) { - for (int id : OreDictionary.getOreIDs(is)) { - if (OreDictionary.getOreName(id).equals("logWood")) - ProcessingLog.addPyrolyeOvenRecipes(is); - } - } - tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - } + ItemStack[] tInputs = getCompactedInputs(); + FluidStack[] tFluids = getCompactedFluids(); + + if (tInputs.length <= 0) + return false; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; + //Dynamic recipe adding for newly found logWoods - wont be visible in nei most probably + if (tRecipe == null) + tRecipe = addRecipesDynamically(tInputs, tFluids, tTier); - calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) + return false; + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + 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)}; + updateSlots(); + return true; + } + + private GT_Recipe addRecipesDynamically(ItemStack[] tInputs, FluidStack[] tFluids, int tTier) { + if (tInputs.length > 1 || (tInputs[0] != null && tInputs[0].getItem() != GT_Utility.getIntegratedCircuit(0).getItem())) { + int oreId = OreDictionary.getOreID("logWood"); + for (ItemStack is : tInputs) { + for (int id : OreDictionary.getOreIDs(is)) { + if (oreId == id) { + ProcessingLog.addPyrolyeOvenRecipes(is); + return GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + } } - this.mMaxProgresstime = Math.max(mMaxProgresstime * 2 / (1 + coilMetaID), 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)}; - updateSlots(); - return true; } } - return false; + return null; } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2; + Block casingBlock; + int casingMeta; - Block CasingBlock= Loader.isModLoaded("dreamcraft")? GameRegistry.findBlock("dreamcraft","gt.blockcasingsNH"): GregTech_API.sBlockCasings1; - int CasingMeta= Loader.isModLoaded("dreamcraft")?2:0; + if (Loader.isModLoaded("dreamcraft")) { + casingBlock = GameRegistry.findBlock("dreamcraft", "gt.blockcasingsNH"); + casingMeta = 2; + } else { + casingBlock = GregTech_API.sBlockCasings1; + casingMeta = 0; + } replaceDeprecatedCoils(aBaseMetaTileEntity); - boolean firstCoil = true; + MutableBoolean firstCoil = new MutableBoolean(true); for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { for (int h = 0; h < 4; h++) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// inner 3x3 without height - if (h == 0) {// inner floor (Cupronickel or Kanthal coils) - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings5) { - return false; - } - int metaID = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (metaID > 8) { - return false; - } else { - if (firstCoil) { - this.coilMetaID = metaID; - firstCoil = false; - } else if (metaID != this.coilMetaID) { - return false; - } - } - } else if (h == 3) {// inner ceiling (ulv casings + input + muffler) - if ((!addInputToMachineList(tTileEntity, CASING_INDEX)) && (!addMufflerToMachineList(tTileEntity, CASING_INDEX))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { - return false; - } - } - } else {// inside air - if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) { - return false; - } - } + if (checkInnerBroken( + xDir, zDir, + i, h, j, + aBaseMetaTileEntity, tTileEntity, + casingBlock, casingMeta, + firstCoil + ) + ) + return false; } else {// outer 5x5 without height - if (h == 0) {// outer floor (controller, output, energy, maintainance, rest ulv casings) - if ((!addMaintenanceToMachineList(tTileEntity, CASING_INDEX)) && (!addOutputToMachineList(tTileEntity, CASING_INDEX)) && (!addEnergyInputToMachineList(tTileEntity, CASING_INDEX))) { - if ((xDir + i != 0) || (zDir + j != 0)) {//no controller - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { - return false; - } - } - } - } else {// outer above floor (ulv casings) - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { - return false; - } - } + if (checkOuterBroken( + xDir, zDir, + i, h, j, + aBaseMetaTileEntity, tTileEntity, + casingBlock, casingMeta + ) + ) + return false; } } } @@ -222,6 +195,112 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock return true; } + private boolean checkInnerBroken(int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + IGregTechTileEntity tTileEntity, + Block casingBlock, + int casingMeta, + MutableBoolean firstCoil + ) { + if (b == 0) {// inner floor (Coils) + return areCoilsBroken(xDir, zDir, a, b, c, aBaseMetaTileEntity, firstCoil); + } else if (b == 3) {// inner ceiling (ulv casings + input + muffler) + return checkInnerCeilingBroken(xDir, zDir, a, b, c, aBaseMetaTileEntity, tTileEntity, casingBlock, casingMeta); + } else {// inside air + return !aBaseMetaTileEntity.getAirOffset(xDir + a, b, zDir + c); + } + } + + private boolean checkOuterBroken(int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + IGregTechTileEntity tTileEntity, + Block casingBlock, + int casingMeta) { + if (b == 0) {// outer floor (controller, output, energy, maintainance, rest ulv casings) + if (checkOuterFloorLoopControl(xDir, zDir, a, c, tTileEntity)) + return false; + } + // outer above floor (ulv casings) + if (aBaseMetaTileEntity.getBlockOffset(xDir + a, b, zDir + c) != casingBlock) { + return true; + } + return aBaseMetaTileEntity.getMetaIDOffset(xDir + a, b, zDir + c) != casingMeta; + } + + private boolean checkOuterFloorLoopControl(int xDir, + int zDir, + int a, + int c, + IGregTechTileEntity tTileEntity + ) { + if (addMaintenanceToMachineList(tTileEntity, CASING_INDEX)) { + return true; + } + if (addOutputToMachineList(tTileEntity, CASING_INDEX)) { + return true; + } + + if (addEnergyInputToMachineList(tTileEntity, CASING_INDEX)) { + return true; + } + + return (xDir + a == 0) && (zDir + c == 0); + } + + private boolean checkInnerCeilingBroken(int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + IGregTechTileEntity tTileEntity, + Block casingBlock, + int casingMeta) { + if ((addInputToMachineList(tTileEntity, CASING_INDEX)) || (addMufflerToMachineList(tTileEntity, CASING_INDEX))) { + return false; + } + if (aBaseMetaTileEntity.getBlockOffset(xDir + a, b, zDir + c) != casingBlock) { + return true; + } + return aBaseMetaTileEntity.getMetaIDOffset(xDir + a, b, zDir + c) != casingMeta; + } + + private boolean areCoilsBroken(int xDir, + int zDir, + int a, + int b, + int c, + IGregTechTileEntity aBaseMetaTileEntity, + MutableBoolean firstCoil + ) { + Block coil = aBaseMetaTileEntity.getBlockOffset(xDir + a, b, zDir + c); + + if (!(coil instanceof IHeatingCoil)) + return true; + + int metaID = aBaseMetaTileEntity.getMetaIDOffset(xDir + a, b, zDir + c); + + HeatingCoilLevel coilHeat = ((IHeatingCoil) coil).getCoilHeat(metaID); + + if (coilHeat == HeatingCoilLevel.None) { + return true; + } else { + if (firstCoil.isTrue()) { + this.coilHeat = coilHeat; + firstCoil.setFalse(); + } else return coilHeat != this.coilHeat; + } + return false; + } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; @@ -247,6 +326,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock return false; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_PyrolyseOven(this.mName); } @@ -255,13 +335,12 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int tX = aBaseMetaTileEntity.getXCoord() + xDir * 2; - int tY = (int) aBaseMetaTileEntity.getYCoord(); + int tY = aBaseMetaTileEntity.getYCoord(); int tZ = aBaseMetaTileEntity.getZCoord() + zDir * 2; for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1 && - aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) - { + aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) { aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index bf4b1e9db7..c800592d0d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -1,26 +1,29 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; +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.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -public class GT_MetaTileEntity_VacuumFreezer - extends GT_MetaTileEntity_MultiBlockBase { +public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_MultiBlockBase { public GT_MetaTileEntity_VacuumFreezer(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -29,10 +32,12 @@ public class GT_MetaTileEntity_VacuumFreezer super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_VacuumFreezer(this.mName); } + @Override public String[] getDescription() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Vacuum Freezer") @@ -54,38 +59,57 @@ public class GT_MetaTileEntity_VacuumFreezer } } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + ITexture[] rTexture; if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][17], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)}; + if (aActive) { + rTexture = new ITexture[]{ + casingTexturePages[0][17], + TextureFactory.of(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE), + TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).glow().build()}; + } else { + rTexture = new ITexture[]{ + casingTexturePages[0][17], + TextureFactory.of(OVERLAY_FRONT_VACUUM_FREEZER), + TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).glow().build()}; + } + } else { + rTexture = new ITexture[]{casingTexturePages[0][17]}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][17]}; + return rTexture; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sVacuumRecipes; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tInputList = getStoredInputs(); for (ItemStack tInput : tInputList) { long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput}); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, tInput); if (tRecipe != null) { - if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) { + if (tRecipe.isRecipeInputEqual(true, null, tInput)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; @@ -106,6 +130,7 @@ public class GT_MetaTileEntity_VacuumFreezer return false; } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -134,18 +159,22 @@ public class GT_MetaTileEntity_VacuumFreezer return tAmount >= 16; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } 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 4cf20fdf16..533917661b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_AlloySmelter_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true); @@ -25,65 +26,102 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas super(aName, aDescription, aTextures, 2, 1, true); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_AlloySmelter_Bronze(mName, mDescriptionArray, mTextures); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { - this.mOutputItems[0] = tRecipe.getOutput(0); - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = (tRecipe.mDuration * 2); + mOutputItems[0] = tRecipe.getOutput(0); + mEUt = tRecipe.mEUt; + mMaxProgresstime = (tRecipe.mDuration * 2); return 2; } return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(208), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)}; + 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 94b4cfac33..2291ae1aba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_AlloySmelter_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true); @@ -25,65 +26,102 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi super(aName, aDescription, aTextures, 2, 1, true); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_AlloySmelter_Steel(mName, mDescriptionArray, mTextures); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { - this.mOutputItems[0] = tRecipe.getOutput(0); - this.mEUt = (tRecipe.mEUt * 2); - this.mMaxProgresstime = tRecipe.mDuration; + mOutputItems[0] = tRecipe.getOutput(0); + mEUt = (tRecipe.mEUt * 2); + mMaxProgresstime = tRecipe.mDuration; return 2; } return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(208)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(208), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)}; + 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 5013893cbe..ddfe476d15 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Compressor_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Compressing Items", 1, 1, false); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Compressor_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCompressorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(203)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(203), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR)}; + 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 4a3a1e73ee..153f84f74b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Compressor_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Compressing Items", 1, 1, false); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Compressor_Steel(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCompressorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(203)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(203), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR)}; + 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 2d36cf0e98..5c60d071bc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Extractor_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, false); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sExtractorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(200)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(200), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR)}; + 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 e2d762f566..da4753b78e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Extractor_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, false); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sExtractorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(200)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(200), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR)}; + 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 cc99d43c0d..e46a5a74a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_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); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi super(aName, aDescription, aTextures, 1, 1, false); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(1), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)}; + return new ITexture[]{ + super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build()}; } } 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 fbd256c86b..4508c39fda 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -1,17 +1,18 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_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, false); @@ -25,14 +26,17 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic super(aName, aDescription, aTextures, 1, 1, false); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); } + @Override public int checkRecipe() { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs()); if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { @@ -44,46 +48,80 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic return 0; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(1), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER)}; + return new ITexture[]{ + super.getBottomFacingInactive(aColor)[0], + TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), + TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build()}; } } 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 3018b3c9c7..4e704fac12 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -1,18 +1,19 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Furnace_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true); @@ -26,14 +27,17 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac super(aName, aDescription, aTextures, 1, 1, true); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting"); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { this.mEUt = 4; @@ -43,53 +47,86 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac return 0; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { - return false; - } - return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null; + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(207), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)}; + 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 326e648213..eab07f2173 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -1,18 +1,19 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.Textures.BlockIcons.*; + public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Furnace_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true); @@ -26,14 +27,17 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach super(aName, aDescription, aTextures, 1, 1, true); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting"); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public int checkRecipe() { if (null != (this.mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { this.mEUt = 8; @@ -43,53 +47,85 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach return 0; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { - return false; - } - return GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null; + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(207), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE)}; + 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 7b60e70ad1..918d40443c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -1,16 +1,16 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -18,6 +18,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.Random; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Macerator_Bronze(int aID, String aName, String aNameRegional) { @@ -32,25 +33,37 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPreTick(aBaseMetaTileEntity, aTick); if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F, 0.0D, 0.0D, 0.0D); + Random tRandom = getBaseMetaTileEntity().getWorld().rand; + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setMotion(0.0D, 0.0D, 0.0D) + .setIdentifier("smoke") + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F + ) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } } + @Override public int checkRecipe() { GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; - if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; @@ -58,9 +71,7 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - -// if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) -// return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + 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); @@ -69,53 +80,85 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { - return false; - } - return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, new Object[]{aStack})); + @Override + protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(201), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR)}; + 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 5085f2d66b..a857919cbc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -1,16 +1,16 @@ package gregtech.common.tileentities.machines.steam; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -18,6 +18,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.Random; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Macerator_Steel(int aID, String aName, String aNameRegional) { @@ -32,25 +33,37 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa super(aName, aDescription, aTextures, 1, 1, false); } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Macerator_Steel(this.mName, this.mDescriptionArray, this.mTextures); } + @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPreTick(aBaseMetaTileEntity, aTick); if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F, 0.0D, 0.0D, 0.0D); + Random tRandom = getBaseMetaTileEntity().getWorld().rand; + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setMotion(0D, 0.0D, 0D) + .setIdentifier("smoke") + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F + ) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } } + @Override public int checkRecipe() { GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; - if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; @@ -58,9 +71,7 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - -// if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) -// return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + 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); @@ -69,53 +80,80 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) { - return false; - } - return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, new Object[]{aStack})); + @Override + public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } + @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(201), 10, 1.0F, aX, aY, aZ); } } + @Override public void startProcess() { sendLoopStart((byte) 1); } + @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)}; + 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], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR)}; + 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 606733658b..d78dd722fa 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java @@ -1,12 +1,12 @@ package gregtech.common.tileentities.storage; import cpw.mods.fml.common.Optional; -import gregtech.api.enums.Textures; +import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.objects.AE2DigitalChestHandler; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_QuantumChest; import gregtech.common.gui.GT_GUIContainer_QuantumChest; @@ -17,10 +17,51 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; -@Optional.Interface(iface = "appeng.api.storage.IMEInventory", modid = "appliedenergistics2") -public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEntity_TieredMachineBlock implements appeng.api.storage.IMEInventory<appeng.api.storage.data.IAEItemStack> { +import java.util.HashMap; +import java.util.Map; + +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST_GLOW; + +@Optional.Interface(iface = "appeng.api.storage.IMEMonitor", modid = "appliedenergistics2", striprefs = true) +public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEntity_TieredMachineBlock implements appeng.api.storage.IMEMonitor<appeng.api.storage.data.IAEItemStack> { + protected boolean mVoidOverflow = false; + 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, "This Chest stores " + CommonSizeCompute(aTier) + " Blocks Use a screwdriver to enable voiding items on overflow"); + super(aID, aName, aNameRegional, aTier, 3, new String[]{ + "This Chest stores " + commonSizeCompute(aTier) + " Blocks", + "Use a screwdriver to enable", + "voiding items on overflow" + }); + } + + protected static int commonSizeCompute(int tier) { + switch (tier) { + case 1: + return 4000000; + case 2: + return 8000000; + case 3: + return 16000000; + case 4: + return 32000000; + case 5: + return 64000000; + case 6: + return 128000000; + case 7: + return 256000000; + case 8: + return 512000000; + case 9: + return 1024000000; + case 10: + return 2147483640; + default: + return 0; + } } public GT_MetaTileEntity_DigitalChestBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -31,39 +72,103 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti super(aName, aTier, 3, aDescription, aTextures); } + @Optional.Method(modid = "appliedenergistics2") + public static void registerAEIntegration() { + appeng.api.AEApi.instance().registries().externalStorage().addExternalStorageInterface(new AE2DigitalChestHandler()); + } + + @Optional.Method(modid = "appliedenergistics2") @Override - public boolean isSimpleMachine() { - return true; + public void addListener(appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver, Object o) { + if (listeners == null) + listeners = new HashMap<>(); + listeners.put(imeMonitorHandlerReceiver, o); } + @Optional.Method(modid = "appliedenergistics2") @Override - public boolean isFacingValid(byte aFacing) { - return true; + public void removeListener(appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver) { + if (listeners == null) + listeners = new HashMap<>(); + listeners.remove(imeMonitorHandlerReceiver); } + @Optional.Method(modid = "appliedenergistics2") @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; + public appeng.api.config.AccessRestriction getAccess() { + return appeng.api.config.AccessRestriction.READ_WRITE; } + @Optional.Method(modid = "appliedenergistics2") @Override - public boolean isValidSlot(int aIndex) { - return true; + public boolean isPrioritized(appeng.api.storage.data.IAEItemStack iaeItemStack) { + return false; } + @Optional.Method(modid = "appliedenergistics2") @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); + public boolean canAccept(appeng.api.storage.data.IAEItemStack iaeItemStack) { + ItemStack s = getItemStack(); + if (s == null || iaeItemStack == null) + return true; + return iaeItemStack.isSameType(s); + } + + @Optional.Method(modid = "appliedenergistics2") + @Override + public int getPriority() { + return 0; + } + + @Optional.Method(modid = "appliedenergistics2") + @Override + public int getSlot() { + return 0; + } + + @Optional.Method(modid = "appliedenergistics2") + @Override + public boolean validForPass(int i) { return true; } - - protected boolean mVoidOverflow = false; + + protected abstract ItemStack getItemStack(); + + protected abstract void setItemStack(ItemStack s); @Override - public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mVoidOverflow = !mVoidOverflow; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal(mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); + @Optional.Method(modid = "appliedenergistics2") + public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getAvailableItems(final appeng.api.storage.data.IItemList out) { + ItemStack storedStack = getItemStack(); + if (storedStack != null) { + appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(storedStack); + s.setStackSize(getItemCount()); + out.add(s); + } + return out; + } + + @Optional.Method(modid = "appliedenergistics2") + @Override + public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getStorageList() { + appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> res = new appeng.util.item.ItemList(); + ItemStack storedStack = getItemStack(); + if (storedStack != null) { + appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(storedStack); + s.setStackSize(getItemCount()); + res.add(s); + } + return res; + } + + protected abstract int getItemCount(); + + @Override + public abstract void setItemCount(int aCount); + + @Override + public int getMaxItemCount() { + return commonSizeCompute(mTier); } @Override @@ -77,6 +182,87 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @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) { + final ItemStack inputStack = input.getItemStack(); + if (inputStack == null) + return null; + if (mode != appeng.api.config.Actionable.SIMULATE) + getBaseMetaTileEntity().markDirty(); + ItemStack storedStack = getItemStack(); + if (storedStack != null) { + if (GT_Utility.areStacksEqual(storedStack, inputStack)) { + if (input.getStackSize() + getItemCount() > getMaxItemCount()) { + if (mVoidOverflow) { + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount(getMaxItemCount()); + return null; + } + return createOverflowStack(input.getStackSize() + getItemCount(), mode); + } + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount(getItemCount() + (int) input.getStackSize()); + return null; + } + return input; + } + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemStack(inputStack.copy()); + if (input.getStackSize() > getMaxItemCount()) + return createOverflowStack(input.getStackSize(), mode); + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount((int) input.getStackSize()); + return null; + } + + @Optional.Method(modid = "appliedenergistics2") + private appeng.api.storage.data.IAEItemStack createOverflowStack(long size, appeng.api.config.Actionable mode) { + final appeng.api.storage.data.IAEItemStack overflow = appeng.util.item.AEItemStack.create(getItemStack()); + overflow.setStackSize(size - getMaxItemCount()); + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount(getMaxItemCount()); + return overflow; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public appeng.api.storage.data.IAEItemStack extractItems(final appeng.api.storage.data.IAEItemStack request, final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { + if (request.isSameType(getItemStack())) { + if (mode != appeng.api.config.Actionable.SIMULATE) + getBaseMetaTileEntity().markDirty(); + if (request.getStackSize() >= getItemCount()) { + appeng.util.item.AEItemStack result = appeng.util.item.AEItemStack.create(getItemStack()); + result.setStackSize(getItemCount()); + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount(0); + return result; + } else { + if (mode != appeng.api.config.Actionable.SIMULATE) + setItemCount(getItemCount() - (int) request.getStackSize()); + return request.copy(); + } + } + return null; + } + + @Override + @Optional.Method(modid = "appliedenergistics2") + public appeng.api.storage.StorageChannel getChannel() { + return appeng.api.storage.StorageChannel.ITEMS; + } + + @Override + public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mVoidOverflow = !mVoidOverflow; + GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal(mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); + } + + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().isAllowedToWork()) { @@ -89,9 +275,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } int count = getItemCount(); ItemStack stack = getItemStack(); - if ((mInventory[0] != null) && ((count < getMaxItemCount())|| mVoidOverflow ) && GT_Utility.areStacksEqual(mInventory[0], stack)) { - count += mInventory[0].stackSize; + int savedCount = count; + if ((mInventory[0] != null) && ((count < getMaxItemCount()) || mVoidOverflow) && GT_Utility.areStacksEqual(mInventory[0], stack)) { + count += mInventory[0].stackSize; if (count <= getMaxItemCount()) { mInventory[0] = null; } else { @@ -119,107 +306,53 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } else { mInventory[2] = null; } - } - } - abstract protected int getItemCount(); - abstract public void setItemCount(int aCount); - abstract protected ItemStack getItemStack(); - abstract protected void setItemStack(ItemStack s); - - @Override - public int getProgresstime() { - return getItemCount() + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + (mInventory[1] == null ? 0 : mInventory[1].stackSize); - } - - @Override - public int maxProgresstime() { - return getMaxItemCount(); - } - - protected static int CommonSizeCompute(int tier){ - switch(tier){ - case 1: - return 4000000; - case 2: - return 8000000; - case 3: - return 16000000; - case 4: - return 32000000; - case 5: - return 64000000; - case 6: - return 128000000; - case 7: - return 256000000; - case 8: - return 512000000; - case 9: - return 1024000000; - case 10: - return 2147483640; - default: - return 0; + if (GregTech_API.mAE2) + notifyListeners(count - savedCount, stack); + if (count != savedCount) + getBaseMetaTileEntity().markDirty(); } } @Override - public int getMaxItemCount() { - return CommonSizeCompute(mTier); + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.openGUI(aPlayer); + return true; } @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 1; + public boolean isFacingValid(byte aFacing) { + return true; } @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 0 && (mInventory[0] == null || GT_Utility.areStacksEqual(mInventory[0], aStack)); - } - - abstract protected String chestName(); - - @Optional.Method(modid = "appliedenergistics2") - public static void registerAEIntegration() { - appeng.api.AEApi.instance().registries().externalStorage().addExternalStorageInterface(new AE2DigitalChestHandler()); + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; } @Override - public boolean isGivingInformation() { + public boolean isValidSlot(int aIndex) { return true; } @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mItemCount", getItemCount()); - if (getItemStack() != null) - aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); - aNBT.setBoolean("mVoidOverflow", mVoidOverflow); + public boolean isSimpleMachine() { + return true; } @Override - public void loadNBTData(NBTTagCompound aNBT) { - if (aNBT.hasKey("mItemCount")) - setItemCount(aNBT.getInteger("mItemCount")); - if (aNBT.hasKey("mItemStack")) - setItemStack(ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack"))); - mVoidOverflow = aNBT.getBoolean("mVoidOverflow"); - + public int getProgresstime() { + return getItemCount() + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + (mInventory[1] == null ? 0 : mInventory[1].stackSize); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QCHEST)}; - } - return aSide == aBaseMetaTileEntity.getFrontFacing() ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QCHEST)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]};//aSide != aFacing ? mMachineBlock != 0 ? new ITexture[] {Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]} : new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]} : mMachineBlock != 0 ? aActive ? getTexturesActive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : getTexturesInactive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : aActive ? getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]) : getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]); + public int maxProgresstime() { + return getMaxItemCount(); } @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - return new ITexture[0][0][0]; + public boolean isGivingInformation() { + return true; } @Override @@ -243,85 +376,68 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti }; } + @Override + public ItemStack[] getStoredItemData() { + return mInventory; + } + + protected abstract String chestName(); + @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) { - final ItemStack inputStack = input.getItemStack(); - if (inputStack == null) - return null; - ItemStack storedStack = getItemStack(); - if (storedStack != null) { - if (GT_Utility.areStacksEqual(storedStack, inputStack)) { - if (input.getStackSize() + getItemCount() > getMaxItemCount()) - { - if (mVoidOverflow) - { - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getMaxItemCount()); - return null; - } - else - { - return createOverflowStack(input.getStackSize() + getItemCount(), mode); - } - } - else { - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getItemCount() + (int) input.getStackSize()); - } - return null; - } else - return input; - } else { - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemStack(inputStack.copy()); - if (input.getStackSize() > getMaxItemCount()) - return createOverflowStack(input.getStackSize(), mode); - else if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount((int) input.getStackSize()); - return null; + private void notifyListeners(int count, ItemStack stack) { + if (listeners == null) { + listeners = new HashMap<>(); + return; } + if (count == 0 || stack == null) + return; + appeng.util.item.ItemList change = new appeng.util.item.ItemList(); + appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(stack); + s.setStackSize(count); + change.add(s); + listeners.forEach((l, o) -> { + if (l.isValid(o)) + l.postChange(this, change, null); + else + removeListener(l); + }); } - @Optional.Method(modid = "appliedenergistics2") - private appeng.api.storage.data.IAEItemStack createOverflowStack(long size, appeng.api.config.Actionable mode) { - final appeng.api.storage.data.IAEItemStack overflow = appeng.util.item.AEItemStack.create(getItemStack()); - overflow.setStackSize(size - getMaxItemCount()); - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getMaxItemCount()); - return overflow; + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mItemCount", getItemCount()); + if (getItemStack() != null) + aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); + aNBT.setBoolean("mVoidOverflow", mVoidOverflow); } - @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) { - if (request.equals(getItemStack())) { - if (request.getStackSize() >= getItemCount()) { - appeng.util.item.AEItemStack result = appeng.util.item.AEItemStack.create(getItemStack()); - result.setStackSize(getItemCount()); - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(0); - return result; - } else { - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getItemCount() - (int) request.getStackSize()); - return request.copy(); - } - } - return null; + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (aNBT.hasKey("mItemCount")) + setItemCount(aNBT.getInteger("mItemCount")); + if (aNBT.hasKey("mItemStack")) + setItemStack(ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack"))); + mVoidOverflow = aNBT.getBoolean("mVoidOverflow"); + } - @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.StorageChannel getChannel() { - return appeng.api.storage.StorageChannel.ITEMS; + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 1; } - @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getAvailableItems(final appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> out) { - ItemStack storedStack = getItemStack(); - if (storedStack != null) { - appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(storedStack); - s.setStackSize(getItemCount()); - out.add(s); - } - return out; + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 0 && (mInventory[0] == null || GT_Utility.areStacksEqual(mInventory[0], aStack)); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide != aFacing) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[]{ + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_SCHEST), + TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build() + }; } } 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 1eb62153e7..2295042d1a 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -1,24 +1,27 @@ package gregtech.common.tileentities.storage; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; 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.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; +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 { +import static gregtech.api.enums.Textures.BlockIcons.LOCKERS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_IN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_LOCKER; + +public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlock { public byte mType = 0; public GT_MetaTileEntity_Locker(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 4, "Stores and recharges Armor", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, 4, "Stores and recharges Armor"); } public GT_MetaTileEntity_Locker(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -29,6 +32,7 @@ public class GT_MetaTileEntity_Locker super(aName, aTier, 4, aDescription, aTextures); } + @Override public String[] getDescription() { String[] desc = new String[mDescriptionArray.length + 1]; System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); @@ -36,114 +40,138 @@ public class GT_MetaTileEntity_Locker return desc; } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)]}; + ITexture[] tmp0 = {MACHINE_CASINGS[this.mTier][(i + 1)]}; rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], Textures.BlockIcons.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 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], new GT_RenderedTexture(Textures.BlockIcons.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) { if (aSide == aFacing) { - return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[Math.abs(this.mType % Textures.BlockIcons.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)]; } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } + @Override public boolean isSimpleMachine() { return false; } + @Override public boolean isElectric() { return true; } + @Override public boolean isValidSlot(int aIndex) { return true; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } + @Override public boolean isEnetInput() { return true; } + @Override public boolean isInputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getBackFacing(); } + @Override public boolean isTeleporterCompatible() { return false; } + @Override public long maxEUStore() { return gregtech.api.enums.GT_Values.V[this.mTier] * maxAmperesIn(); } + @Override public long maxEUInput() { return gregtech.api.enums.GT_Values.V[this.mTier]; } + @Override public long maxAmperesIn() { - return this.mInventory.length * 2; + return this.mInventory.length * 2L; } + @Override public int rechargerSlotStartIndex() { return 0; } + @Override public int rechargerSlotCount() { return getBaseMetaTileEntity().isAllowedToWork() ? this.mInventory.length : 0; } + @Override public boolean isAccessAllowed(EntityPlayer aPlayer) { return true; } + @Override public void saveNBTData(NBTTagCompound aNBT) { aNBT.setByte("mType", this.mType); } + @Override public void loadNBTData(NBTTagCompound aNBT) { this.mType = aNBT.getByte("mType"); } + @Override public void onValueUpdate(byte aValue) { this.mType = aValue; } + @Override public byte getUpdateData() { return this.mType; } + @Override public void doSound(byte aIndex, double aX, double aY, double aZ) { if (aIndex == 16) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(3)), 1, 1.0F); + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(3), 1, 1.0F); } } + @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { this.mType = ((byte) (this.mType + 1)); } } + @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { return aSide != getBaseMetaTileEntity().getFrontFacing(); } + @Override 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++) { @@ -157,10 +185,12 @@ public class GT_MetaTileEntity_Locker return true; } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } + @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } 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 10a1a14bda..396b6d6464 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,19 +1,38 @@ package gregtech.common.tileentities.storage; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; -public class GT_MetaTileEntity_QuantumTank - extends GT_MetaTileEntity_BasicTank { +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK_GLOW; + +public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_BasicTank { public GT_MetaTileEntity_QuantumTank(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Stores " + CommonSizeCompute(aTier) + "L of fluid"); + super(aID, aName, aNameRegional, aTier, 3, "Stores " + commonSizeCompute(aTier) + "L of fluid"); + } + + private static int commonSizeCompute(int tier) { + switch (tier) { + case 6: + return 128000000; + case 7: + return 256000000; + case 8: + return 512000000; + case 9: + return 1024000000; + case 10: + return 2147483640; + default: + return 0; + } } public GT_MetaTileEntity_QuantumTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -30,96 +49,84 @@ public class GT_MetaTileEntity_QuantumTank } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QTANK)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + public boolean isSimpleMachine() { + return true; } @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); + public boolean doesFillContainers() { + return true; } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); + public boolean doesEmptyContainers() { return true; } @Override - public boolean isSimpleMachine() { + public boolean canTankBeFilled() { return true; } @Override - public boolean isFacingValid(byte aFacing) { + public boolean canTankBeEmptied() { return true; } @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { + public boolean displaysItemStack() { return true; } @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); + public boolean displaysStackSize() { + return false; } @Override - public final byte getUpdateData() { - return 0x00; + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescriptionArray, mTextures); } @Override - public boolean doesFillContainers() { - return true; + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[]{ + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_QTANK), + TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() + }; } @Override - public boolean doesEmptyContainers() { + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.openGUI(aPlayer); return true; } @Override - public boolean canTankBeFilled() { - return true; + public final byte getUpdateData() { + return 0x00; } @Override - public boolean canTankBeEmptied() { + public boolean isFacingValid(byte aFacing) { return true; } @Override - public boolean displaysItemStack() { + public boolean isAccessAllowed(EntityPlayer aPlayer) { return true; } @Override - public boolean displaysStackSize() { - return false; + public int getTankPressure() { + return 100; } @Override - 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 + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET - }; - } - return new String[]{ - EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET, - "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW+ Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET - }; + public int getCapacity() { + return commonSizeCompute(mTier); } @Override @@ -128,35 +135,24 @@ public class GT_MetaTileEntity_QuantumTank } @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescriptionArray, mTextures); - } + public String[] getInfoData() { - private static int CommonSizeCompute(int tier){ - switch(tier){ - case 6: - return 128000000; - case 7: - return 256000000; - case 8: - return 512000000; - case 9: - return 1024000000; - case 10: - return 2147483640; - default: - return 0; + 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 + getCapacity() + " L" + EnumChatFormatting.RESET + }; } - } - - @Override - public int getCapacity() { - return CommonSizeCompute(mTier); - } - - @Override - public int getTankPressure() { - return 100; + return new String[]{ + EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + getCapacity() + " L" + EnumChatFormatting.RESET + }; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java index 3f53058f8d..e566ba9ed5 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java @@ -20,20 +20,34 @@ public class GT_MetaTileEntity_SuperChest extends GT_MetaTileEntity_DigitalChest public GT_MetaTileEntity_SuperChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } + @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperChest(mName, mTier, mDescriptionArray, mTextures); + protected ItemStack getItemStack() { + return mItemStack; } + @Override - protected String chestName(){ return "Super Chest"; } + protected void setItemStack(ItemStack s) { + mItemStack = s; + } + @Override - protected int getItemCount() { return mItemCount; } + protected int getItemCount() { + return mItemCount; + } + @Override public void setItemCount(int aCount) { mItemCount = aCount; } + @Override - protected ItemStack getItemStack(){ return mItemStack; } + protected String chestName() { + return "Super Chest"; + } + @Override - protected void setItemStack(ItemStack s){ mItemStack = s; } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperChest(mName, mTier, mDescriptionArray, mTextures); + } } 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 a6e4d11599..41171720f5 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,19 +1,38 @@ package gregtech.common.tileentities.storage; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; -public class GT_MetaTileEntity_SuperTank - extends GT_MetaTileEntity_BasicTank { +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK_GLOW; + +public class GT_MetaTileEntity_SuperTank extends GT_MetaTileEntity_BasicTank { public GT_MetaTileEntity_SuperTank(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Stores " + CommonSizeCompute(aTier) + "L of fluid"); + super(aID, aName, aNameRegional, aTier, 3, "Stores " + commonSizeCompute(aTier) + "L of fluid"); + } + + private static int commonSizeCompute(int tier) { + switch (tier) { + case 1: + return 4000000; + case 2: + return 8000000; + case 3: + return 16000000; + case 4: + return 32000000; + case 5: + return 64000000; + default: + return 0; + } } public GT_MetaTileEntity_SuperTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -30,96 +49,84 @@ public class GT_MetaTileEntity_SuperTank } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_STANK)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + public boolean isSimpleMachine() { + return true; } @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); + public boolean doesFillContainers() { + return true; } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); + public boolean doesEmptyContainers() { return true; } @Override - public boolean isSimpleMachine() { + public boolean canTankBeFilled() { return true; } @Override - public boolean isFacingValid(byte aFacing) { + public boolean canTankBeEmptied() { return true; } @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { + public boolean displaysItemStack() { return true; } @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); + public boolean displaysStackSize() { + return false; } @Override - public final byte getUpdateData() { - return 0x00; + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperTank(mName, mTier, mDescription, mTextures); } @Override - public boolean doesFillContainers() { - return true; + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[]{ + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_QTANK), + TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() + }; } @Override - public boolean doesEmptyContainers() { + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.openGUI(aPlayer); return true; } @Override - public boolean canTankBeFilled() { - return true; + public final byte getUpdateData() { + return 0x00; } @Override - public boolean canTankBeEmptied() { + public boolean isFacingValid(byte aFacing) { return true; } @Override - public boolean displaysItemStack() { + public boolean isAccessAllowed(EntityPlayer aPlayer) { return true; } @Override - public boolean displaysStackSize() { - return false; + public int getTankPressure() { + return 100; } @Override - 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 + Integer.toString(0) + " L"+ EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET - }; - } - return new String[]{ - EnumChatFormatting.BLUE + "Super Tank"+ EnumChatFormatting.RESET, - "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW+ Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET - }; + public int getCapacity() { + return commonSizeCompute(mTier); } @Override @@ -128,35 +135,24 @@ public class GT_MetaTileEntity_SuperTank } @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperTank(mName, mTier, mDescription, mTextures); - } + public String[] getInfoData() { - private static int CommonSizeCompute(int tier){ - switch(tier){ - case 1: - return 4000000; - case 2: - return 8000000; - case 3: - return 16000000; - case 4: - return 32000000; - case 5: - return 64000000; - default: - return 0; + 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 + getCapacity() + " L" + EnumChatFormatting.RESET + }; } - } - - @Override - public int getCapacity() { - return CommonSizeCompute(mTier); - } - - @Override - public int getTankPressure() { - return 100; + return new String[]{ + EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + 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 d8ca77a388..198ee4fb5a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -19,93 +19,113 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public abstract class GT_Tool - implements IToolStats { +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[] ZERO_ENCHANTMENTS = new Enchantment[0]; public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; + @Override public int getToolDamagePerBlockBreak() { return 100; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 800; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance; } + @Override public String getMiningSound() { return null; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); } + @Override public int getBaseQuality() { return 0; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isGrafter() { return false; } + @Override public boolean isChainsaw(){ return false; } + @Override public boolean isWrench() { return false; } + @Override public boolean isWeapon() { return false; } + @Override public boolean isRangedWeapon() { return false; } + @Override public boolean isMiningTool() { return true; } + @Override public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) { return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); } @@ -114,35 +134,43 @@ public abstract class GT_Tool return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity); } + @Override public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { return 0; } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public Enchantment[] getEnchantments(ItemStack aStack) { return ZERO_ENCHANTMENTS; } + @Override public int[] getEnchantmentLevels(ItemStack aStack) { return ZERO_ENCHANTMENT_LEVELS; } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { aPlayer.triggerAchievement(AchievementList.openInventory); aPlayer.triggerAchievement(AchievementList.mineWood); aPlayer.triggerAchievement(AchievementList.buildWorkBench); } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override 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) { return aOriginalDamage; } 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 67594753c7..edbdb3b61b 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java @@ -17,73 +17,89 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public class GT_Tool_Axe - extends GT_Tool { +public class GT_Tool_Axe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getSpeedMultiplier() { return 2.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood); } + @Override public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { @@ -98,6 +114,7 @@ public class GT_Tool_Axe return rAmount; } + @Override public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){ @@ -113,21 +130,26 @@ public class GT_Tool_Axe return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been chopped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 7497cb8b2f..1ba110252a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java @@ -19,24 +19,28 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public class GT_Tool_BranchCutter - extends GT_Tool { +public class GT_Tool_BranchCutter extends GT_Tool { + @Override public float getBaseDamage() { return 2.5F; } + @Override public float getSpeedMultiplier() { return 0.25F; } + @Override public float getMaxDurabilityMultiplier() { return 0.25F; } + @Override public boolean isGrafter() { return true; } + @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) { if (aBlock.getMaterial() == Material.leaves) { aEvent.dropChance = Math.min(1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F)); @@ -58,19 +62,23 @@ public class GT_Tool_BranchCutter return 0; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves); } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.GRAFTER : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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); } 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 52994e22b2..f57ba7f5d3 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java @@ -12,68 +12,83 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_ButcheryKnife - extends GT_Tool { +public class GT_Tool_ButcheryKnife extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance * 2; } + @Override public float getSpeedMultiplier() { return 0.1F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMiningTool() { return false; } + @Override public Enchantment[] getEnchantments(ItemStack aStack) { return LOOTING_ENCHANTMENT; } + @Override public int[] getEnchantmentLevels(ItemStack aStack) { return new int[]{(2 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.BUTCHERYKNIFE : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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); } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return false; } 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 1a0a6c13e7..f0a3169c7a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java @@ -11,52 +11,63 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_BuzzSaw - extends GT_Tool_Saw { +public class GT_Tool_BuzzSaw extends GT_Tool_Saw { + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 300; } + @Override public float getBaseDamage() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + return (String) GregTech_API.sSoundList.get(104); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(105)); + return (String) GregTech_API.sSoundList.get(105); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + return (String) GregTech_API.sSoundList.get(104); } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return false; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_BUZZSAW; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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); } 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 2ca6b688ff..117b7b6bc0 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 @@ -4,40 +4,48 @@ 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 { +public class GT_Tool_Chainsaw_HV extends GT_Tool_Chainsaw_LV { + @Override public int getToolDamagePerBlockBreak() { return 800; } + @Override public int getToolDamagePerDropConversion() { return 1600; } + @Override public int getToolDamagePerContainerCraft() { return 12800; } + @Override public int getToolDamagePerEntityAttack() { return 3200; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 4.0F; } + @Override public float getSpeedMultiplier() { return 4.0F; } + @Override public float getMaxDurabilityMultiplier() { return 4.0F; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; } 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 127f477542..f746f7e43f 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 @@ -22,74 +22,89 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.ArrayList; import java.util.List; -public class GT_Tool_Chainsaw_LV - extends GT_Tool_Saw { +public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 800; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getSpeedMultiplier() { return 2.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + return (String) GregTech_API.sSoundList.get(104); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(105)); + return (String) GregTech_API.sSoundList.get(105); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(104)); + return (String) GregTech_API.sSoundList.get(104); } + @Override public boolean canBlock() { return false; } + @Override public boolean isChainsaw(){ return true; } + @Override public boolean isWeapon() { return true; } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "brrrr"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildChainsaw"); - } catch (Exception e) { + } catch (Exception ignored) { } } @Override @@ -100,20 +115,7 @@ public class GT_Tool_Chainsaw_LV if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); aDrops.clear(); -// aDrops.addAll(tDrops); -// aEvent.dropChance = 1.0F; -// for (ItemStack stack : tDrops) -// { -// Random itemRand = new Random(); -// float f = 0.7F; -// double d = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; -// double d1 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; -// double d2 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; -// EntityItem entityitem = new EntityItem(aPlayer.worldObj, aX + d, aY + d1, aZ + d2, stack); -// entityitem.delayBeforeCanPickup = 10; -// aPlayer.worldObj.spawnEntityInWorld(entityitem); -// } -// aPlayer.addStat(net.minecraft.stats.StatList.mineBlockStatArray[Block.getIdFromBlock(aBlock)], 1); + } aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); } else @@ -135,6 +137,7 @@ public class GT_Tool_Chainsaw_LV return rAmount; } + @Override public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){ @@ -150,14 +153,17 @@ public class GT_Tool_Chainsaw_LV return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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); } 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 0fcd74ebf7..e571a26cfc 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 @@ -4,40 +4,48 @@ 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 { +public class GT_Tool_Chainsaw_MV extends GT_Tool_Chainsaw_LV { + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 400; } + @Override public int getToolDamagePerContainerCraft() { return 3200; } + @Override public int getToolDamagePerEntityAttack() { return 800; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 3.5F; } + @Override public float getSpeedMultiplier() { return 3.0F; } + @Override public float getMaxDurabilityMultiplier() { return 2.0F; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; } 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 613037ea91..43890b0c93 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -17,68 +17,83 @@ import net.minecraft.util.IChatComponent; import java.util.Iterator; -public class GT_Tool_Crowbar - extends GT_Tool { +public class GT_Tool_Crowbar extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 2.0F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return true; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { if (aBlock.getMaterial() == Material.circuits) { return true; @@ -95,22 +110,27 @@ public class GT_Tool_Crowbar return tTool.equals("crowbar"); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.CROWBAR : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Crowbar(1, 1000)); } + @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); } 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 42968cf9e8..36c414d40f 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 @@ -6,49 +6,58 @@ 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 { +public class GT_Tool_Drill_HV extends GT_Tool_Drill_LV { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 400 : 800; } + @Override public int getToolDamagePerDropConversion() { return 1600; } + @Override public int getToolDamagePerContainerCraft() { return 12800; } + @Override public int getToolDamagePerEntityAttack() { return 3200; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getSpeedMultiplier() { return 9.0F; } + @Override public float getMaxDurabilityMultiplier() { return 4.0F; } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "highpowerdrill"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDDrill"); - } catch (Exception e) { + } 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] : 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 8f5e6bdfe2..898b549753 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 @@ -15,84 +15,103 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Drill_LV - extends GT_Tool { +public class GT_Tool_Drill_LV extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 2.0F; } + @Override public float getSpeedMultiplier() { return 3.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + return (String) GregTech_API.sSoundList.get(106); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + return (String) GregTech_API.sSoundList.get(106); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + return (String) GregTech_API.sSoundList.get(106); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(106)); + return (String) GregTech_API.sSoundList.get(106); } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || ((tTool.equals("pickaxe")) || (tTool.equals("shovel")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.glass); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); aPlayer.triggerAchievement(AchievementList.buildPickaxe); @@ -100,10 +119,11 @@ public class GT_Tool_Drill_LV try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "driltime"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDrill"); - } catch (Exception e) { + } 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 + ")"); } 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 de9c067f3c..7bfddc6f98 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 @@ -7,38 +7,47 @@ 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; } + @Override public int getToolDamagePerDropConversion() { return 400; } + @Override public int getToolDamagePerContainerCraft() { return 3200; } + @Override public int getToolDamagePerEntityAttack() { return 800; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 2.5F; } + @Override public float getSpeedMultiplier() { return 6.0F; } + @Override public float getMaxDurabilityMultiplier() { return 2.0F; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; } 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 b17f350aca..dc6bc759b1 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_File.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java @@ -13,86 +13,107 @@ import net.minecraft.util.IChatComponent; public class GT_Tool_File extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMiningTool() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || tTool.equals("file")); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] : Textures.ItemIcons.HANDLE_FILE; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been filed D for 'Dead' by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 1627b22fa5..8cb09da5f9 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java @@ -22,91 +22,109 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.Arrays; import java.util.List; -public class GT_Tool_HardHammer - extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); +public class GT_Tool_HardHammer extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); + @Override 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; } + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 200; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance * 2; } + @Override public float getSpeedMultiplier() { return 0.75F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(1)); + return (String) GregTech_API.sSoundList.get(1); } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(2)); + return (String) GregTech_API.sSoundList.get(2); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || ((tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == 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) { int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{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, new ItemStack[]{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) { @@ -125,31 +143,37 @@ public class GT_Tool_HardHammer return rConversions; } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Prospecting(1, 1000)); } + @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); } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "tools"); - } catch (Exception e) { + } 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 b6d57ba0fb..65849d7dad 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java @@ -14,90 +14,110 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Hoe - extends GT_Tool { +public class GT_Tool_Hoe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.75F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("hoe"))) || (aBlock.getMaterial() == Material.gourd); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Hoe(100)); } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); aPlayer.triggerAchievement(AchievementList.buildHoe); } + @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); } 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 863775d6fb..f76170963a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java @@ -17,51 +17,60 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public class GT_Tool_JackHammer - extends GT_Tool_Drill_LV { +public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 200 : 400; } + @Override public int getToolDamagePerDropConversion() { return 400; } + @Override public int getToolDamagePerContainerCraft() { return 3200; } + @Override public int getToolDamagePerEntityAttack() { return 800; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getSpeedMultiplier() { return 12.0F; } + @Override public float getMaxDurabilityMultiplier() { return 2.0F; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == 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) { int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{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, new ItemStack[]{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) { @@ -80,19 +89,22 @@ public class GT_Tool_JackHammer return rConversions; } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "hammertime"); - } catch (Exception e) { + } catch (Exception ignored) { } } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.JACKHAMMER : null; } + @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); } 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 db49fb35df..2a4ba6fff9 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java @@ -9,44 +9,53 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Knife - extends GT_Tool_Sword { +public class GT_Tool_Knife extends GT_Tool_Sword { + @Override public int getToolDamagePerBlockBreak() { return 100; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 600; } + @Override public float getBaseDamage() { return 0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance * 3; } + @Override public float getSpeedMultiplier() { return 0.5F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.KNIFE : null; } + @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!!!"); } 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 28e122b1d9..772da53b7f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java @@ -12,87 +12,107 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Mortar - extends GT_Tool { +public class GT_Tool_Mortar extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 2.0F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMiningTool() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return false; } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.MORTAR : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was grounded by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 19f1380a94..db9d3a6a5f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java @@ -14,94 +14,114 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Pickaxe - extends GT_Tool { +public class GT_Tool_Pickaxe extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 25 : 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.glass); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); aPlayer.triggerAchievement(AchievementList.buildPickaxe); aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "flintpick"); - } catch (Exception e) { + } 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); } 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 08463ed1ca..0239598222 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java @@ -17,23 +17,26 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public class GT_Tool_Plow - extends GT_Tool { +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) { return (aEntity instanceof EntitySnowman) ? aOriginalDamage * 4.0F : aOriginalDamage; } + @Override public float getBaseDamage() { return 1.0F; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow); } + @Override public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { @@ -41,7 +44,10 @@ public class GT_Tool_Plow for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { for (int k = -1; k < 2; k++) { - if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { + if (((i != 0) || (j != 0) || (k != 0)) + && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) + && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) + { rConversions++; } } @@ -52,14 +58,17 @@ public class GT_Tool_Plow return rConversions; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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); } 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 72c0080deb..c0046a8a6c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java @@ -15,57 +15,67 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Plunger - extends GT_Tool { +public class GT_Tool_Plunger extends GT_Tool { + @Override public float getBaseDamage() { return 1.25F; } + @Override public float getMaxDurabilityMultiplier() { return 0.25F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || tTool.equals("plunger")); } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.PLUNGER : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Plunger_Item(getToolDamagePerDropConversion())); aItem.addItemBehavior(aID, new Behaviour_Plunger_Fluid(getToolDamagePerDropConversion())); try { - Object tObject = GT_Utility.callConstructor("gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", 0, null, false, new Object[]{Integer.valueOf(getToolDamagePerDropConversion())}); + Object tObject = GT_Utility.callConstructor("gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", 0, null, false, getToolDamagePerDropConversion()); if ((tObject instanceof IItemBehaviour)) { aItem.addItemBehavior(aID, (IItemBehaviour) tObject); } - } catch (Throwable e) { + } 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); } 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 ca0d85e3d6..b4b1422d92 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java @@ -11,43 +11,52 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_RollingPin - extends GT_Tool { +public class GT_Tool_RollingPin extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public float getBaseDamage() { return 2.0F; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return false; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : Dyes._NULL.mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.ROLLING_PIN : null; } + @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); } 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 aafd989bac..fb37a55eef 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java @@ -19,56 +19,68 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.ArrayList; import java.util.List; -public class GT_Tool_Saw - extends GT_Tool { +public class GT_Tool_Saw extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 200; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.75F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @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) { if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); @@ -88,26 +100,32 @@ public class GT_Tool_Saw return 0; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || ((tTool.equals("axe")) || (tTool.equals("saw")))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_SAW; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was getting cut down by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 65af5d5c92..674a52133d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java @@ -16,83 +16,101 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Scoop - extends GT_Tool { +public class GT_Tool_Scoop extends GT_Tool { public static Material sBeeHiveMaterial; + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 200; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.0F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("scoop"))) || (aBlock.getMaterial() == sBeeHiveMaterial); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.SCOOP : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { if(Loader.isModLoaded(GT_Values.MOD_ID_FR)){ aItem.addItemBehavior(aID, new Behaviour_Scoop(200)); @@ -102,6 +120,7 @@ public class GT_Tool_Scoop } + @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); } 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 4d19ee0671..f6b99bdb5a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java @@ -20,97 +20,118 @@ import net.minecraft.util.IChatComponent; import java.util.Arrays; import java.util.List; -public class GT_Tool_Screwdriver - extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"}); +public class GT_Tool_Screwdriver extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"); + @Override 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; } + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + return (String) GregTech_API.sSoundList.get(100); } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMiningTool() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("screwdriver"))) || (aBlock.getMaterial() == Material.circuits); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_SCREWDRIVER; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Screwdriver(1, 200)); } + @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 + ")"); } 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 93255f7f2f..d8d97cdc4b 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 @@ -5,20 +5,23 @@ 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 { +public class GT_Tool_Screwdriver_LV extends GT_Tool_Screwdriver { + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public int getToolDamagePerContainerCraft() { return 200; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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 c9af2fc5a6..99830fe315 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java @@ -16,24 +16,27 @@ import net.minecraftforge.event.world.BlockEvent; import java.util.List; -public class GT_Tool_Sense - extends GT_Tool { +public class GT_Tool_Sense extends GT_Tool { private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getMaxDurabilityMultiplier() { return 4.0F; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves); } + @Override public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { @@ -41,7 +44,9 @@ public class GT_Tool_Sense for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { for (int k = -2; k < 3; k++) { - if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { + if (((i != 0) || (j != 0) || (k != 0)) + && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) + && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { rConversions++; } } @@ -52,18 +57,22 @@ public class GT_Tool_Sense return rConversions; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Sense(getToolDamagePerBlockBreak())); } + @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); } 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 1549eaebab..ee42c6345c 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java @@ -11,84 +11,103 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_Shovel - extends GT_Tool { +public class GT_Tool_Shovel extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("shovel"))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got dug up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 5bee44aa03..ef460bdcc4 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java @@ -12,97 +12,119 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_SoftHammer - extends GT_Tool { +public class GT_Tool_SoftHammer extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 800; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance * 2; } + @Override public float getSpeedMultiplier() { return 0.1F; } + @Override public float getMaxDurabilityMultiplier() { return 8.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public String getEntityHitSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(101)); + return (String) GregTech_API.sSoundList.get(101); } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMiningTool() { return false; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || tTool.equals("softhammer")); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_SoftHammer(100)); } + @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); } 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 1b13e9207a..c8eefb40ea 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 @@ -21,95 +21,117 @@ import java.util.Arrays; import java.util.List; public class GT_Tool_Soldering_Iron extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"}); + public static final List<String> mEffectiveList = Arrays.asList(EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"); + @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; } + @Override public int getToolDamagePerBlockBreak() { return 1000; } + @Override public int getToolDamagePerDropConversion() { return 500; } + @Override public int getToolDamagePerContainerCraft() { return 1000; } + @Override public int getToolDamagePerEntityAttack() { return 500; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + return (String) GregTech_API.sSoundList.get(100); } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMiningTool() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("soldering_iron"))) || (aBlock.getMaterial() == Material.circuits); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[49] : Textures.ItemIcons.HANDLE_SOLDERING; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Screwdriver(1, 200)); } + @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 + ")"); } 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 305b8313eb..a357fe3ba0 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java @@ -10,85 +10,104 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.stats.AchievementList; -public class GT_Tool_Sword - extends GT_Tool { +public class GT_Tool_Sword extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 100; } + @Override public int getToolDamagePerEntityAttack() { return 100; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 4.0F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("sword"))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] : Textures.ItemIcons.HANDLE_SWORD; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); aPlayer.triggerAchievement(AchievementList.buildSword); 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 8ac83ef486..249ca04acb 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java @@ -10,6 +10,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; public abstract class GT_Tool_Turbine extends GT_Tool { + @Override public abstract float getBaseDamage(); @Override @@ -27,6 +28,7 @@ public abstract class GT_Tool_Turbine extends GT_Tool { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null; } + @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"); @@ -34,10 +36,13 @@ public abstract class GT_Tool_Turbine extends GT_Tool { public abstract IIconContainer getTurbineIcon(); + @Override public abstract float getSpeedMultiplier(); + @Override public abstract float getMaxDurabilityMultiplier(); + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } 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 cd0f406f18..690c3c1b5a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java @@ -15,98 +15,119 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_UniversalSpade - extends GT_Tool { +public class GT_Tool_UniversalSpade extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 100; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public float getSpeedMultiplier() { return 0.75F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return true; } + @Override public boolean isCrowbar() { return true; } + @Override public boolean isWeapon() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @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]; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Crowbar(2, 2000)); } + @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { super.onToolCrafted(aStack, aPlayer); aPlayer.triggerAchievement(AchievementList.buildSword); try { GT_Mod.instance.achievements.issueAchievement(aPlayer, "unitool"); - } catch (Exception e) { + } 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); } 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 a68275f88f..b77efa1e4e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java @@ -11,84 +11,103 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_WireCutter - extends GT_Tool { +public class GT_Tool_WireCutter extends GT_Tool { + @Override public int getToolDamagePerBlockBreak() { return 100; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 400; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.25F; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { return null; } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { return null; } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && ( tTool == null || tTool.isEmpty() || (tTool.equals("cutter"))); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.WIRE_CUTTER : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { } + @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has cut the Cable for the Life Support Machine of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } 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 26a77ed229..98fc1005c0 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java @@ -20,112 +20,125 @@ import net.minecraft.util.IChatComponent; import java.util.Arrays; import java.util.List; -public class GT_Tool_Wrench - extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); +public class GT_Tool_Wrench extends GT_Tool { + public static final List<String> mEffectiveList = Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); + @Override 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; } + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 800; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 3.0F; } + @Override public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { return aOriginalHurtResistance * 2; } + @Override public float getSpeedMultiplier() { return 1.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public String getCraftingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + return (String) GregTech_API.sSoundList.get(100); } + @Override public String getEntityHitSound() { return null; } + @Override public String getBreakingSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(0)); + return (String) GregTech_API.sSoundList.get(0); } + @Override public String getMiningSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(100)); + return (String) GregTech_API.sSoundList.get(100); } + @Override public boolean canBlock() { return false; } + @Override public boolean isCrowbar() { return false; } + @Override public boolean isWrench() { return true; } + @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { String tTool = aBlock.getHarvestTool(aMetaData); return aBlock.getHarvestLevel(aMetaData) != -1 && (tTool == null || tTool.isEmpty() || (tTool.equals("wrench"))) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper); } + @Override public ItemStack getBrokenItem(ItemStack aStack) { return null; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.WRENCH : null; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : null; } + @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { aItem.addItemBehavior(aID, new Behaviour_Wrench(100)); } + @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); } } - - -/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar - - * Qualified Name: gregtech.common.tools.GT_Tool_Wrench - - * JD-Core Version: 0.7.0.1 - - */ 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 deb7a8dbc3..4ec433d9a7 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 @@ -5,48 +5,58 @@ 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 { +public class GT_Tool_Wrench_HV extends GT_Tool_Wrench_LV { + @Override public int getToolDamagePerBlockBreak() { return 800; } + @Override public int getToolDamagePerDropConversion() { return 1600; } + @Override public int getToolDamagePerContainerCraft() { return 12800; } + @Override public int getToolDamagePerEntityAttack() { return 3200; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 2.0F; } + @Override public float getSpeedMultiplier() { return 4.0F; } + @Override public float getMaxDurabilityMultiplier() { return 4.0F; } + @Override public boolean canBlock() { return false; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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 034752f265..12b83dcb83 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 @@ -7,52 +7,63 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -public class GT_Tool_Wrench_LV - extends GT_Tool_Wrench { +public class GT_Tool_Wrench_LV extends GT_Tool_Wrench { + @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { return aOriginalDamage; } + @Override public int getToolDamagePerBlockBreak() { return 50; } + @Override public int getToolDamagePerDropConversion() { return 100; } + @Override public int getToolDamagePerContainerCraft() { return 800; } + @Override public int getToolDamagePerEntityAttack() { return 200; } + @Override public int getBaseQuality() { return 0; } + @Override public float getBaseDamage() { return 1.0F; } + @Override public float getSpeedMultiplier() { return 2.0F; } + @Override public float getMaxDurabilityMultiplier() { return 1.0F; } + @Override public boolean canBlock() { return false; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { 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 8a3fb4f968..5ffc3b1481 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 @@ -5,48 +5,58 @@ 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 { +public class GT_Tool_Wrench_MV extends GT_Tool_Wrench_LV { + @Override public int getToolDamagePerBlockBreak() { return 200; } + @Override public int getToolDamagePerDropConversion() { return 400; } + @Override public int getToolDamagePerContainerCraft() { return 3200; } + @Override public int getToolDamagePerEntityAttack() { return 800; } + @Override public int getBaseQuality() { return 1; } + @Override public float getBaseDamage() { return 1.5F; } + @Override public float getSpeedMultiplier() { return 3.0F; } + @Override public float getMaxDurabilityMultiplier() { return 2.0F; } + @Override public boolean canBlock() { return false; } + @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; } + @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } diff --git a/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java b/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java index 64b088cac0..01987f8b47 100644 --- a/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_CoverBehaviorLoader.java @@ -2,8 +2,8 @@ package gregtech.loaders.load; import gregtech.api.util.GT_Log; -public class GT_CoverBehaviorLoader - implements Runnable { +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 f03a5e0920..d791e05105 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -13,8 +13,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_FuelLoader - implements Runnable { +public class GT_FuelLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Initializing various Fuels."); ItemList.sNitricAcid = GT_Mod.gregtechproxy.addFluid("nitricacid", "Nitric acid ", Materials.NitricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitricAcid, 1), ItemList.Cell_Empty.get(1, new Object[0]), 1000); @@ -43,19 +43,6 @@ public class GT_FuelLoader GT_Values.RA.addFuel(new ItemStack(Items.ghast_tear, 1), null, 50, 5); GT_Values.RA.addFuel(new ItemStack(Blocks.beacon, 1), null, Materials.NetherStar.mFuelPower * 2, Materials.NetherStar.mFuelType); GT_Values.RA.addFuel(GT_ModHandler.getModItem("EnderIO", "bucketRocket_fuel", 1), null, 250, 1); - /*if(GregTech_API.mMagneticraft){ - GT_Values.RA.addFuel(GT_ModHandler.getModItem("Magneticraft", "item.bucket_light_oil", 1), null, 256, 0); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("Magneticraft", "item.bucket_heavy_oil", 1), null, 192, 3); - } - if(GregTech_API.mImmersiveEngineering){ - GT_Values.RA.addFuel(GT_ModHandler.getModItem("ImmersiveEngineering", "fluidContainers", 1, 7), null, 128, 0); - } - if(Loader.isModLoaded("PneumaticCraft")){ - GT_Values.RA.addFuel(GT_ModHandler.getModItem("PneumaticCraft", "pgBucket", 1), null, 512, 1); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("PneumaticCraft", "fuelBucket", 1), null, 400, 0); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("PneumaticCraft", "fuelBucket", 1, 1), null, 400, 0); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("PneumaticCraft", "keroseneBucket", 1), null, 256, 0); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("PneumaticCraft", "dieselBucket", 1), null, 200, 0); - }*/ + } } diff --git a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java index 0fd4a13391..4c9724e840 100644 --- a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java +++ b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java @@ -2,7 +2,13 @@ package gregtech.loaders.load; import buildcraft.api.tools.IToolWrench; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +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.items.GT_Generic_Item; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; @@ -17,55 +23,53 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.IFluidContainerItem; -import java.util.Iterator; - -public class GT_ItemIterator - implements Runnable { +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(new ItemStack[]{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); GT_ModHandler.addSmeltingRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L)); } - if (null != (tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{tStack2 = GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 1L), tStack2, tStack2, tStack2, null, tStack2, tStack2, tStack2, tStack2}))) { + if (null != (tStack = GT_ModHandler.getRecipeOutput(tStack2 = GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 1L), tStack2, tStack2, tStack2, null, tStack2, tStack2, tStack2, tStack2))) { GT_OreDictUnificator.registerOre(OreDictNames.craftingRawMachineTier00, tStack); GT_ModHandler.addPulverisationRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 8L), null, 0, false); GT_ModHandler.addSmeltingRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L)); } ItemStack tStack3; - if (null != (tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{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), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), 0, false); } - if (null != (tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{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), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), 0, false); } GT_Log.out.println("GT_Mod: Registering various Tools to be usable on GregTech Machines"); - GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(new ItemStack[]{null, new ItemStack(Items.iron_ingot, 1), null, new ItemStack(Items.stick, 1)})); - GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(Items.iron_ingot, 1), null, null, null, new ItemStack(Items.stick, 1)})); + GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(null, new ItemStack(Items.iron_ingot, 1), null, new ItemStack(Items.stick, 1))); + GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(new ItemStack(Items.iron_ingot, 1), null, null, null, new ItemStack(Items.stick, 1))); GT_Log.out.println("GT_Mod: Adding Food Recipes to the Automatic Canning Machine. (also during the following Item Iteration)"); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.rotten_flesh, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L, new Object[0]), ItemList.IC2_Food_Can_Spoiled.get(1L, new Object[0]), null, 200, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.spider_eye, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L, new Object[0]), ItemList.IC2_Food_Can_Spoiled.get(1L, new Object[0]), null, 100, 1); - GT_Values.RA.addCannerRecipe(ItemList.Food_Poisonous_Potato.get(2L, new Object[0]), ItemList.IC2_Food_Can_Empty.get(1L, new Object[0]), ItemList.IC2_Food_Can_Spoiled.get(1L, new Object[0]), null, 100, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.cake, 1, 32767), ItemList.IC2_Food_Can_Empty.get(12L, new Object[0]), ItemList.IC2_Food_Can_Filled.get(12L, new Object[0]), null, 600, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.mushroom_stew, 1, 32767), ItemList.IC2_Food_Can_Empty.get(6L, new Object[0]), ItemList.IC2_Food_Can_Filled.get(6L, new Object[0]), new ItemStack(Items.bowl, 1), 300, 1); + GT_Values.RA.addCannerRecipe(new ItemStack(Items.rotten_flesh, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 200, 1); + GT_Values.RA.addCannerRecipe(new ItemStack(Items.spider_eye, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 100, 1); + GT_Values.RA.addCannerRecipe(ItemList.Food_Poisonous_Potato.get(2L), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 100, 1); + GT_Values.RA.addCannerRecipe(new ItemStack(Items.cake, 1, 32767), ItemList.IC2_Food_Can_Empty.get(12L), ItemList.IC2_Food_Can_Filled.get(12L), null, 600, 1); + GT_Values.RA.addCannerRecipe(new ItemStack(Items.mushroom_stew, 1, 32767), ItemList.IC2_Food_Can_Empty.get(6L), ItemList.IC2_Food_Can_Filled.get(6L), new ItemStack(Items.bowl, 1), 300, 1); GT_Log.out.println("GT_Mod: Scanning ItemList."); try { - Iterator tIterator = Item.itemRegistry.iterator(); - while (tIterator.hasNext()) { + /*(tName.equals("tile.sedimentaryStone")) ||**/ + for (Object o : Item.itemRegistry) { Object tObject; - if (((tObject = tIterator.next()) instanceof Item) && (!(tObject instanceof GT_Generic_Item))) { + if (((tObject = o) instanceof Item) && (!(tObject instanceof GT_Generic_Item))) { Item tItem = (Item) tObject; String tName; if ((tName = tItem.getUnlocalizedName()) != null) { if ((tItem instanceof IToolCrowbar)) { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityRCCrowbars", false)) && - (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { + (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite RC Crowbar: " + tName); } } else if (GregTech_API.registerCrowbar(new ItemStack(tItem, 1, 32767))) { @@ -75,7 +79,7 @@ public class GT_ItemIterator if ((tItem instanceof IToolWrench)) { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityBCWrenches", false)) && - (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { + (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite BC Wrench: " + tName); } } else if (GregTech_API.registerWrench(new ItemStack(tItem, 1, 32767))) { @@ -97,16 +101,16 @@ public class GT_ItemIterator if (((tItem instanceof ItemFood)) && (tItem != ItemList.IC2_Food_Can_Filled.getItem()) && (tItem != ItemList.IC2_Food_Can_Spoiled.getItem())) { int tFoodValue = ((ItemFood) tItem).func_150905_g(new ItemStack(tItem, 1, 0)); if (tFoodValue > 0) { - GT_Values.RA.addCannerRecipe(new ItemStack(tItem, 1, 32767), ItemList.IC2_Food_Can_Empty.get(tFoodValue, new Object[0]), ItemList.IC2_Food_Can_Filled.get(tFoodValue, new Object[0]), GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), tFoodValue * 100, 1); + GT_Values.RA.addCannerRecipe(new ItemStack(tItem, 1, 32767), ItemList.IC2_Food_Can_Empty.get(tFoodValue), ItemList.IC2_Food_Can_Filled.get(tFoodValue), GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), tFoodValue * 100, 1); } } if ((tItem instanceof IFluidContainerItem)) { GT_OreDictUnificator.addToBlacklist(new ItemStack(tItem, 1, 32767)); } - if ((tName.equals("item.ItemSensorLocationCard")) || (tName.equals("item.ItemEnergySensorLocationCard")) || (tName.equals("item.ItemEnergyArrayLocationCard")) || (tName.equals("item.ItemTextCard")) || (tName.equals("item.ItemTextCard")) || (tName.equals("item.ItemVanillaMachineCard")) || (tName.equals("item.RFSensorCard")) || (tName.equals("item.Item55ReactorCard"))) { + if ((tName.equals("item.ItemSensorLocationCard")) || (tName.equals("item.ItemEnergySensorLocationCard")) || (tName.equals("item.ItemEnergyArrayLocationCard")) || (tName.equals("item.ItemTextCard")) || (tName.equals("item.ItemVanillaMachineCard")) || (tName.equals("item.RFSensorCard")) || (tName.equals("item.Item55ReactorCard"))) { GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); } - if ((tName.equals("item.ItemTimeCard")) || (tName.equals("item.itemCounterSensorLocationCard")) || (tName.equals("item.ItemLiquidSensorLocationCard")) || (tName.equals("item.ItemGeneratorSensorLocationCard")) || (tName.equals("item.ItemLiquidArrayLocationCard")) || (tName.equals("item.ItemInventoryScannerCard")) || (tName.equals("item.AppengCard")) || (tName.equals("item.RFenergyCard")) || (tName.equals("item.ItemVanillaMachineCard"))) { + if ((tName.equals("item.ItemTimeCard")) || (tName.equals("item.itemCounterSensorLocationCard")) || (tName.equals("item.ItemLiquidSensorLocationCard")) || (tName.equals("item.ItemGeneratorSensorLocationCard")) || (tName.equals("item.ItemLiquidArrayLocationCard")) || (tName.equals("item.ItemInventoryScannerCard")) || (tName.equals("item.AppengCard")) || (tName.equals("item.RFenergyCard")) || (tName.equals("item.ItemVanillaMachineCard"))) { GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, GT_ModHandler.getIC2Item("electronicCircuit", 1L), 100, 30); } if (tName.equals("tile.ArsMagica:ore_vinteum")) { @@ -187,7 +191,7 @@ public class GT_ItemIterator GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 6)); } - if (/**(tName.equals("tile.sedimentaryStone")) ||**/ ((tName.equals("tile.igneousStone")) || (tName.equals("tile.igneousStoneBrick")) || (tName.equals("tile.igneousCobblestone")))) { + if (/**(tName.equals("tile.sedimentaryStone")) ||**/((tName.equals("tile.igneousStone")) || (tName.equals("tile.igneousStoneBrick")) || (tName.equals("tile.igneousCobblestone")))) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 2)); diff --git a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java index cd3f7c0bad..d37a40da43 100644 --- a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java @@ -6,150 +6,150 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_SonictronLoader - implements Runnable { +public class GT_SonictronLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Loading Sonictron Sounds"); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.iron_block, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.harp"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.gold_block, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.pling"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.stone, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.bd"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.log, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.bassattack"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.planks, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.bass"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.glass, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.hat"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.sand, 1)); GT_Mod.gregtechproxy.mSoundNames.add("note.snare"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(25)); + GT_Mod.gregtechproxy.mSoundCounts.add(25); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.record_cat, 1)); GT_Mod.gregtechproxy.mSoundNames.add("streaming."); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(12)); + GT_Mod.gregtechproxy.mSoundCounts.add(12); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.tnt, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.explode"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(3)); + GT_Mod.gregtechproxy.mSoundCounts.add(3); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.fire, 1)); GT_Mod.gregtechproxy.mSoundNames.add("fire.fire"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.flint_and_steel, 1)); GT_Mod.gregtechproxy.mSoundNames.add("fire.ignite"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.lava, 1)); GT_Mod.gregtechproxy.mSoundNames.add("liquid.lavapop"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.water, 1)); GT_Mod.gregtechproxy.mSoundNames.add("liquid.water"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.water_bucket, 1)); GT_Mod.gregtechproxy.mSoundNames.add("liquid.splash"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.lava_bucket, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.fizz"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.portal, 1)); GT_Mod.gregtechproxy.mSoundNames.add("portal.portal"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.end_portal, 1)); GT_Mod.gregtechproxy.mSoundNames.add("portal.travel"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.end_portal_frame, 1)); GT_Mod.gregtechproxy.mSoundNames.add("portal.trigger"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.glass_pane, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.glass"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.ender_pearl, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.orb"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.ender_eye, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.levelup"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.stone_button, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.click"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.cobblestone, 1)); GT_Mod.gregtechproxy.mSoundNames.add("damage.fallbig"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.dirt, 1)); GT_Mod.gregtechproxy.mSoundNames.add("damage.fallsmall"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.iron_sword, 1)); GT_Mod.gregtechproxy.mSoundNames.add("damage.hurtflesh"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.diamond_sword, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.hurt"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.bow, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.bow"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.arrow, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.drr"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.fishing_rod, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.bowhit"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.iron_shovel, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.break"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.bucket, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.breath"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.potionitem, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.drink"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.glass_bottle, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.burp"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + 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.mSoundNames.add("random.chestopen"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.chest, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.chestclosed"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.iron_door, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.door_open"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.wooden_door, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.door_close"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.porkchop, 1)); GT_Mod.gregtechproxy.mSoundNames.add("random.eat"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.wool, 1)); GT_Mod.gregtechproxy.mSoundNames.add("step.cloth"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.grass, 1)); GT_Mod.gregtechproxy.mSoundNames.add("step.grass"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.gravel, 1)); GT_Mod.gregtechproxy.mSoundNames.add("step.gravel"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.snow, 1)); GT_Mod.gregtechproxy.mSoundNames.add("step.snow"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.piston, 1)); GT_Mod.gregtechproxy.mSoundNames.add("tile.piston.out"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.sticky_piston, 1)); GT_Mod.gregtechproxy.mSoundNames.add("tile.piston.in"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.mossy_cobblestone, 1)); GT_Mod.gregtechproxy.mSoundNames.add("ambient.cave.cave"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.lapis_block, 1)); GT_Mod.gregtechproxy.mSoundNames.add("ambient.weather.rain"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.diamond_block, 1)); GT_Mod.gregtechproxy.mSoundNames.add("ambient.weather.thunder"); - GT_Mod.gregtechproxy.mSoundCounts.add(Integer.valueOf(1)); + GT_Mod.gregtechproxy.mSoundCounts.add(1); } } diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 5965bf6035..e7a34e13d3 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -30,9 +30,6 @@ import thaumcraft.api.ThaumcraftApiHelper; import java.util.concurrent.ConcurrentHashMap; public class GT_Achievements { - - //public static List<Materials> oreList = new ArrayList<Materials>(); - //public static List<Integer[]> oreStats = new ArrayList<Integer[]>(); public static int oreReg = -1; public static int assReg=-1; public ConcurrentHashMap<String, Achievement> achievementList; @@ -43,39 +40,7 @@ public class GT_Achievements { public GT_Achievements() { this.achievementList = new ConcurrentHashMap<>(); this.issuedAchievements = new ConcurrentHashMap<>(); - /*int oreList_sS=oreList.size(); - for (int i = 0; i < oreList_sS; i++) { - if (oreList.get(i) != null) { - if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) { - GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore"); - - StringBuilder dimensions = new StringBuilder(); - boolean isFirst = true; - if (oreStats.get(i)[3] == 1) { - dimensions.append("Overworld"); - isFirst = false; - } - if (oreStats.get(i)[4] == 1) { - if (!isFirst) dimensions.append("/"); - dimensions.append("Nether"); - isFirst = false; - } - if (oreStats.get(i)[5] == 1) { - if (!isFirst) dimensions.append("/"); - dimensions.append("End"); - isFirst = false; - } - GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); - } - //if(oreList.get(i)==null) - // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement."); - //if(oreList.get(i).name()==null) - // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement."); - //else - registerOreAchievement(oreList.get(i)); - } - } -*/ + for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) registerAssAchievement(recipe); @@ -214,13 +179,6 @@ public class GT_Achievements { registerAchievement("whatnow", 8, 10, ItemList.ZPM2.get(1), "denseaspossible", false); } -// if(Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres){ -// for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) { -// if ((GregTech_API.sGeneratedMaterials[i] != null) && !oreList.contains(GregTech_API.sGeneratedMaterials[i])) { -// codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1)); -// } -// } -// } if (GT_Mod.gregtechproxy.mAchievements) { AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray( new Achievement[this.achievementList.size()]))); @@ -230,11 +188,6 @@ public class GT_Achievements { } public static void registerOre(Materials aMaterial, int min, int max, int chance, boolean overworld, boolean nether, boolean end) { - /*if (aMaterial != Materials._NULL) { - oreList.add(aMaterial); - //if(!oreList.add(aMaterial)) Minecraft.getMinecraft().crashed(new CrashReport("GT Achievement - Ore with that (" + aMaterial.name() + ") material already exists.",new IllegalArgumentException())); - } - oreStats.add(new Integer[]{min, max, chance, overworld ? 1 : 0, nether ? 1 : 0, end ? 1 : 0});*/ } public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, boolean special) { @@ -245,7 +198,7 @@ public class GT_Achievements { if (special) { achievement.setSpecial(); } - achievement.registerStat(); + ((StatBase)achievement).registerStat(); if (GT_Values.D2) { GT_Log.out.println("achievement." + textId + "="); GT_Log.out.println("achievement." + textId + ".desc="); @@ -263,7 +216,7 @@ public class GT_Achievements { if (special) { achievement.setSpecial(); } - achievement.registerStat(); + ((StatBase)achievement).registerStat(); if (GT_Values.D2) { GT_Log.out.println("achievement." + textId + "="); GT_Log.out.println("achievement." + textId + ".desc="); @@ -273,12 +226,6 @@ public class GT_Achievements { } public Achievement registerOreAchievement(Materials aMaterial) { - /* - if (this.achievementList.get(aMaterial.mName) == null) { - oreReg++; - return registerAchievement(aMaterial.mName, -(6 + oreReg % 5), ((oreReg) / 5) - 8, new ItemStack(GregTech_API.sBlockOres1, 1, - aMaterial.mMetaItemSubID), AchievementList.openInventory, false); - }*/ return null; } @@ -295,14 +242,7 @@ public class GT_Achievements { if (entityplayer == null || !GT_Mod.gregtechproxy.mAchievements) { return; } -// if (this.achievementList.containsKey(textId)) { -// if(this.issuedAchievements.containsKey((entityplayer.getDisplayName()+textId))){ -// return; -// }else{ -// this.issuedAchievements.put((entityplayer.getDisplayName()+textId), true); entityplayer.triggerAchievement((StatBase) this.achievementList.get(textId)); -// } -// } } public Achievement getAchievement(String textId) { @@ -352,18 +292,25 @@ public class GT_Achievements { if (player == null || fluid == null) { return; } - if (fluid.getFluid().getUnlocalizedName().equals("fluid.plasma.helium")) { - issueAchievement(player, "fusion"); - } else if (fluid.getFluid().getUnlocalizedName().equals("fluid.molten.europium")) { - issueAchievement(player, "advancing"); - } else if (fluid.getFluid().getUnlocalizedName().equals("fluid.molten.naquadah")) { - issueAchievement(player, "stargateliquid"); - } else if (fluid.getFluid().getUnlocalizedName().equals("fluid.molten.americium")) { - issueAchievement(player, "tothelimit"); - } else if (fluid.getFluid().getUnlocalizedName().equals("fluid.molten.neutronium")) { - issueAchievement(player, "denseaspossible"); - } else if (fluid.getFluid().getUnlocalizedName().equals("fluid.plasma.nitrogen")) { - issueAchievement(player, "higherefficency"); + switch (fluid.getFluid().getUnlocalizedName()) { + case "fluid.plasma.helium": + issueAchievement(player, "fusion"); + break; + case "fluid.molten.europium": + issueAchievement(player, "advancing"); + break; + case "fluid.molten.naquadah": + issueAchievement(player, "stargateliquid"); + break; + case "fluid.molten.americium": + issueAchievement(player, "tothelimit"); + break; + case "fluid.molten.neutronium": + issueAchievement(player, "denseaspossible"); + break; + case "fluid.plasma.nitrogen": + issueAchievement(player, "higherefficency"); + break; } } @@ -374,35 +321,42 @@ public class GT_Achievements { if (player == null || stack == null) { return; } - //if(stack.getItem()==Items.paper){player.inventory.addItemStackToInventory(new ItemStack(Blocks.stone_slab,2));}//TODO REALLY BLOODASP, REALLY ItemData data = GT_OreDictUnificator.getItemData(stack); if (data != null) { if (data.mPrefix == OrePrefixes.dust && data.mMaterial.mMaterial == Materials.Bronze) { issueAchievement(player, "bronze"); -// } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == Materials.Advanced) { -// issueAchievement(player, "stepforward"); } } if (stack.getUnlocalizedName().startsWith("gt.metaitem.")) { - if (stack.getUnlocalizedName().equals("gt.metaitem.01.2300")) { - issueAchievement(player, "bronze"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32700")) { - issueAchievement(player, "smallparts"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32702")) { - issueAchievement(player, "bettercircuits"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.23354")) { - issueAchievement(player, "magneticiron"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32600")) { - issueAchievement(player, "lvmotor"); - issueAchievement(player, "buildCable"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32610")) { - issueAchievement(player, "pumpcover"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32630")) { - issueAchievement(player, "transport"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32650")) { - issueAchievement(player, "complexmachines"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32670")) { - issueAchievement(player, "hightech"); + switch (stack.getUnlocalizedName()) { + case "gt.metaitem.01.2300": + issueAchievement(player, "bronze"); + break; + case "gt.metaitem.01.32700": + issueAchievement(player, "smallparts"); + break; + case "gt.metaitem.01.32702": + issueAchievement(player, "bettercircuits"); + break; + case "gt.metaitem.01.23354": + issueAchievement(player, "magneticiron"); + break; + case "gt.metaitem.01.32600": + issueAchievement(player, "lvmotor"); + issueAchievement(player, "buildCable"); + break; + case "gt.metaitem.01.32610": + issueAchievement(player, "pumpcover"); + break; + case "gt.metaitem.01.32630": + issueAchievement(player, "transport"); + break; + case "gt.metaitem.01.32650": + issueAchievement(player, "complexmachines"); + break; + case "gt.metaitem.01.32670": + issueAchievement(player, "hightech"); + break; } } else if (stack.getUnlocalizedName().equals("ic2.blockCrop")) { issueAchievement(player, "crops"); @@ -566,64 +520,88 @@ public class GT_Achievements { } // GT_FML_LOGGER.info(stack.getUnlocalizedName()); if (stack.getUnlocalizedName().startsWith("gt.metaitem.")) { - if (stack.getUnlocalizedName().equals("gt.metaitem.02.32500")) { - issueAchievement(player, "havestlead"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32501")) { - issueAchievement(player, "havestsilver"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32503")) { - issueAchievement(player, "havestiron"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32504")) { - issueAchievement(player, "havestgold"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32530")) { - issueAchievement(player, "havestcopper"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32540")) { - issueAchievement(player, "havesttin"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32510")) { - issueAchievement(player, "havestoil"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.02.32511")) { - issueAchievement(player, "havestemeralds"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32082")) { - issueAchievement(player, "energyflow"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32702")) { - issueAchievement(player, "bettercircuits"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32707")) { - issueAchievement(player, "datasaving"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32597")) { - issueAchievement(player, "orbs"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32599")) { - issueAchievement(player, "thatspower"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32598")) { - issueAchievement(player, "luck"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32749")) { - issueAchievement(player, "closeit"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32730")) { - issueAchievement(player, "manipulation"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32729")) { - issueAchievement(player, "filterregulate"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32605")) { - issueAchievement(player, "whatnow"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32736")) { - issueAchievement(player, "zpmage"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32737")) { - issueAchievement(player, "uvage"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32030")) { - issueAchievement(player, "gtmonosilicon"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32036")) { - issueAchievement(player, "gtlogicwafer"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32701")) { - issueAchievement(player, "gtlogiccircuit"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32085")) { - issueAchievement(player, "gtquantumprocessor"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32089")) { - issueAchievement(player, "gtcrystalprocessor"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32092")) { - issueAchievement(player, "gtwetware"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.03.32095")) { - issueAchievement(player, "gtwetmain"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32736")) { - issueAchievement(player, "zpmage"); - } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32737")) { - issueAchievement(player, "uvage"); + switch (stack.getUnlocalizedName()) { + case "gt.metaitem.02.32500": + issueAchievement(player, "havestlead"); + break; + case "gt.metaitem.02.32501": + issueAchievement(player, "havestsilver"); + break; + case "gt.metaitem.02.32503": + issueAchievement(player, "havestiron"); + break; + case "gt.metaitem.02.32504": + issueAchievement(player, "havestgold"); + break; + case "gt.metaitem.02.32530": + issueAchievement(player, "havestcopper"); + break; + case "gt.metaitem.02.32540": + issueAchievement(player, "havesttin"); + break; + case "gt.metaitem.02.32510": + issueAchievement(player, "havestoil"); + break; + case "gt.metaitem.02.32511": + issueAchievement(player, "havestemeralds"); + break; + case "gt.metaitem.03.32082": + issueAchievement(player, "energyflow"); + break; + case "gt.metaitem.01.32702": + issueAchievement(player, "bettercircuits"); + break; + case "gt.metaitem.01.32707": + issueAchievement(player, "datasaving"); + break; + case "gt.metaitem.01.32597": + issueAchievement(player, "orbs"); + break; + case "gt.metaitem.01.32599": + issueAchievement(player, "thatspower"); + break; + case "gt.metaitem.01.32598": + issueAchievement(player, "luck"); + break; + case "gt.metaitem.01.32749": + issueAchievement(player, "closeit"); + break; + case "gt.metaitem.01.32730": + issueAchievement(player, "manipulation"); + break; + case "gt.metaitem.01.32729": + issueAchievement(player, "filterregulate"); + break; + case "gt.metaitem.01.32605": + issueAchievement(player, "whatnow"); + break; + case "gt.metaitem.01.32736": + issueAchievement(player, "zpmage"); + break; + case "gt.metaitem.01.32737": + issueAchievement(player, "uvage"); + break; + case "gt.metaitem.03.32030": + issueAchievement(player, "gtmonosilicon"); + break; + case "gt.metaitem.03.32036": + issueAchievement(player, "gtlogicwafer"); + break; + case "gt.metaitem.01.32701": + issueAchievement(player, "gtlogiccircuit"); + break; + case "gt.metaitem.03.32085": + issueAchievement(player, "gtquantumprocessor"); + break; + case "gt.metaitem.03.32089": + issueAchievement(player, "gtcrystalprocessor"); + break; + case "gt.metaitem.03.32092": + issueAchievement(player, "gtwetware"); + break; + case "gt.metaitem.03.32095": + issueAchievement(player, "gtwetmain"); + break; } } else if (stack.getUnlocalizedName().equals("gt.Thoriumcell")) { issueAchievement(player, "newfuel"); diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index 097c2dd034..d2eab08786 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -1234,7 +1234,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "TCChaos"), getSpecies(MAGICBEES, "TCVoid"), 6); if (Loader.isModLoaded("TaintedMagic")) - tMutation.requireResource(GameRegistry.findBlock("TaintedMagic", "BlockShadowmetal"), 0); + tMutation.requireResource("blockShadow"); } ), DIVIDED(GT_BranchDefinition.THAUMIC, "Unstable", true, new Color(0xF0F0F0), new Color(0xDCDCDC), @@ -1408,7 +1408,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { ), AMERICIUM(GT_BranchDefinition.RADIOACTIVE, "Americium", false, new Color(0xE6E6FF), new Color(0xC8C8C8), beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.AMERICUM), 0.05f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.AMERICIUM), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setNocturnal(); @@ -2772,4 +2772,4 @@ public enum GT_BeeDefinition implements IBeeDefinition { public final IBeeDefinition getRainResist() { return new BeeVariation.RainResist(this); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java index bc95782cdf..16f4b4fe59 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java @@ -171,4 +171,4 @@ public enum GT_BranchDefinition { public final IClassification getBranch() { return branch; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java index 5082e20f4a..4b30517973 100644 --- a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java +++ b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java @@ -1,24 +1,26 @@ package gregtech.loaders.misc; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; +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; +import static gregtech.api.enums.Textures.BlockIcons.VENT_ADVANCED; +import static gregtech.api.enums.Textures.BlockIcons.VENT_NORMAL; + 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), new GT_CopiedBlockTexture(Blocks.wool, 0, i), null); + GregTech_API.registerCover(new ItemStack(Blocks.carpet, 1, i), TextureFactory.of(Blocks.wool, i), null); } - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(1)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(1)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_Vent(2)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentSpread", 1L), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(2)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_Vent(3)); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(1)); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(1)); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), TextureFactory.of(VENT_ADVANCED), new GT_Cover_Vent(2)); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentSpread", 1L), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(2)); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), TextureFactory.of(VENT_ADVANCED), new GT_Cover_Vent(3)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java index 4e1875d747..2c4948ce36 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java @@ -9,6 +9,7 @@ public class ProcessingAll implements gregtech.api.interfaces.IOreRecipeRegistra for (OrePrefixes tPrefix : OrePrefixes.values()) tPrefix.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (((aStack.getItem() instanceof net.minecraft.item.ItemBlock)) && (aPrefix.mDefaultStackSize < aStack.getItem().getItemStackLimit(aStack))) 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 0fa74a3f1b..4ed4d7efa9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java @@ -15,38 +15,47 @@ public class ProcessingArrows implements gregtech.api.interfaces.IOreRecipeRegis OrePrefixes.arrowGtPlastic.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - ItemStack tOutput = GT_Utility.copyAmount(1L, new Object[]{aStack}); + ItemStack tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.smite, EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, tOutput) + 3); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.HolyWater.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.HolyWater.getFluid(25L), tOutput, null, null, null, 100, 2); - tOutput = GT_Utility.copyAmount(1L, new Object[]{aStack}); + tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.fireAspect, EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 3); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(25L), tOutput, null, null, null, 100, 2); - tOutput = GT_Utility.copyAmount(1L, new Object[]{aStack}); + tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.fireAspect, EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Blaze.getMolten(18L), tOutput, null, null, null, 100, 2); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Blaze.getMolten(18L), tOutput, null, null, null, 100, 2); - tOutput = GT_Utility.copyAmount(1L, new Object[]{aStack}); + tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.knockback, EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Rubber.getMolten(18L), tOutput, null, null, null, 100, 2); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Rubber.getMolten(18L), tOutput, null, null, null, 100, 2); - tOutput = GT_Utility.copyAmount(1L, new Object[]{aStack}); + tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); GT_Utility.ItemNBT.addEnchantment(tOutput, gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE, EnchantmentHelper.getEnchantmentLevel(gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(25L), tOutput, null, null, null, 100, 2); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aPrefix) { case arrowGtWood: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" A", " S ", "F ", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Wood), Character.valueOf('F'), OreDictNames.craftingFeather, Character.valueOf('A'), OrePrefixes.toolHeadArrow.get(aMaterial)}); + 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)} + ); case arrowGtPlastic: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.arrowGtPlastic, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" A", " S ", "F ", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Plastic), Character.valueOf('F'), OreDictNames.craftingFeather, Character.valueOf('A'), OrePrefixes.toolHeadArrow.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.arrowGtPlastic, aMaterial, 1L), + GT_Proxy.tBits, + new Object[]{" A", " S ", "F ", 'S', OrePrefixes.stick.get(Materials.Plastic), 'F', OreDictNames.craftingFeather, 'A', OrePrefixes.toolHeadArrow.get(aMaterial)} + ); default: break; } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java index a061b0e266..e292831b05 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java @@ -12,8 +12,9 @@ public class ProcessingBeans implements gregtech.api.interfaces.IOreRecipeRegist 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, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java index 9efb13dfd4..39c71050f5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java @@ -12,25 +12,26 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.block.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), null, (int) Math.max(aMaterial.getMass() * 10L, 1L), 30); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), null, (int) Math.max(aMaterial.getMass() * 10L, 1L), 30); ItemStack tStack1 = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L); ItemStack tStack2 = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); ItemStack tStack3 = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L); - GT_ModHandler.removeRecipe(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); + GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack)); if (tStack1 != null) - GT_ModHandler.removeRecipe(new ItemStack[]{tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1}); + GT_ModHandler.removeRecipeDelayed(tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1); if (tStack2 != null) - GT_ModHandler.removeRecipe(new ItemStack[]{tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2}); + GT_ModHandler.removeRecipeDelayed(tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2); if (tStack3 != null) { - GT_ModHandler.removeRecipe(new ItemStack[]{tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3}); + GT_ModHandler.removeRecipeDelayed(tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3); } if (aMaterial.mStandardMoltenFluid != null) { if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L, new Object[0]), aMaterial.getMolten(1296L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), 288, 8); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), aMaterial.getMolten(1296L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), 288, 8); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial).toString(), false)) { @@ -42,11 +43,12 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.ingot.get(aMaterial)}); } } - if (tStack1 != null) tStack1.stackSize = 9; - if (tStack2 != null) tStack2.stackSize = 9; - if (tStack3 != null) { + if (tStack1 != null) + tStack1.stackSize = 9; + if (tStack2 != null) + tStack2.stackSize = 9; + if (tStack3 != null) tStack3.stackSize = 9; - } GT_Values.RA.addForgeHammerRecipe(aStack, tStack2, 100, 24); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockdecrafting, OrePrefixes.block.get(aMaterial).toString(), tStack2 != null)) { @@ -54,9 +56,8 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.addShapelessCraftingRecipe(tStack3, new Object[]{OrePrefixes.block.get(aMaterial)}); if (tStack2 != null) GT_ModHandler.addShapelessCraftingRecipe(tStack2, new Object[]{OrePrefixes.block.get(aMaterial)}); - if (tStack1 != null) { + if (tStack1 != null) GT_ModHandler.addShapelessCraftingRecipe(tStack1, new Object[]{OrePrefixes.block.get(aMaterial)}); - } } if (!OrePrefixes.block.isIgnored(aMaterial)) GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 9L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); @@ -66,10 +67,9 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist break; case "Iron": case "WroughtIron": - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4); - break; case "Steel": - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4); + GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L), GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Compressed_Coal_Chunk.get(1L), 400, 4); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java index ed82f37b24..406be61b82 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java @@ -13,9 +13,10 @@ public class ProcessingBolt implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.bolt.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Proxy.tBits, new Object[]{"s ", " X", Character.valueOf('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 0d01354db6..d7aa345678 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -14,24 +14,24 @@ import net.minecraft.item.ItemStack; import java.util.ArrayList; import java.util.Iterator; -public class ProcessingCell - implements IOreRecipeRegistrator { +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) { switch (aPrefix) { case cell: if (aMaterial == Materials.Empty) { - GT_ModHandler.removeRecipeByOutput(aStack); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); if (aModName.equalsIgnoreCase("AtomicScience")) { - GT_ModHandler.addExtractionRecipe(ItemList.Cell_Empty.get(1L, new Object[0]), aStack); + GT_ModHandler.addExtractionRecipe(ItemList.Cell_Empty.get(1L), aStack); } } else { if (aMaterial.mFuelPower > 0) { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, aMaterial.mFuelPower, aMaterial.mFuelType); + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, aMaterial.mFuelPower, aMaterial.mFuelType); } if ((aMaterial.mMaterialList.size() > 0) && ((aMaterial.mExtraData & 0x3) != 0)) { int tAllAmount = 0; @@ -40,14 +40,14 @@ public class ProcessingCell tMat2 = (MaterialStack) i$.next(); } long tItemAmount = 0L; - long tCapsuleCount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{aStack}) * -tAllAmount; + 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) { ItemStack tStack; if (tMat.mMaterial == Materials.Air) { - tStack = ItemList.Cell_Air.get(tMat.mAmount * tDensityMultiplier / 2L, new Object[0]); + tStack = ItemList.Cell_Air.get(tMat.mAmount * tDensityMultiplier / 2L); } else { tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); if (tStack == null) { @@ -57,16 +57,15 @@ public class ProcessingCell if (tItemAmount + tMat.mAmount * 3628800L <= aStack.getMaxStackSize() * aMaterial.getDensity()) { tItemAmount += tMat.mAmount * 3628800L; if (tStack != null) { - ItemStack tmp397_395 = tStack; - tmp397_395.stackSize = ((int) (tmp397_395.stackSize * tDensityMultiplier)); + tStack.stackSize = ((int) (tStack.stackSize * tDensityMultiplier)); while ((tStack.stackSize > 64) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 < 0L ? tList.size() < 5 : tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 <= 64L)) { tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64; - tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack})); + tList.add(GT_Utility.copyAmount(64L, tStack)); tStack.stackSize -= 64; } - if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) { - if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}); + if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) { + if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) < 0L ? tList.size() < 5 : tList.size() < 6) { + tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack); tList.add(tStack); } } @@ -78,11 +77,11 @@ public class ProcessingCell if (tList.size() > 0) { if ((aMaterial.mExtraData & 0x1) != 0) { //GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (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 : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); } if ((aMaterial.mExtraData & 0x2) != 0) { //GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (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 : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); } } } @@ -90,10 +89,10 @@ public class ProcessingCell break; case cellPlasma: if (aMaterial == Materials.Empty) { - GT_ModHandler.removeRecipeByOutput(aStack); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); } else { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, (int) Math.max(1024L, 1024L * aMaterial.getMass()), 4); - GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L)); + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, (int) Math.max(1024L, 1024L * aMaterial.getMass()), 4); + GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, aStack), gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L)); } break; default: diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index 133fe3e742..b46bc8fa70 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -12,6 +12,7 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi OrePrefixes.circuit.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if(gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&aModName.equals("gregtech"))return; switch (aMaterial.mName) { @@ -24,18 +25,16 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi case "Infinite": case "Bio": if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&!aModName.equals("gregtech")) - GT_ModHandler.removeRecipeByOutput(aStack); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); break; case "Primitive": - GT_ModHandler.removeRecipeByOutput(aStack); + case "Advanced": + GT_ModHandler.removeRecipeByOutputDelayed(aStack); break; case "Basic": - GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.addCraftingRecipe(aStack, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1,new Object[0]),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1,new Object[0]),'B',ItemList.Circuit_Board_Coated_Basic.get(1,new Object[0]),'I',ItemList.IC2_Item_Casing_Steel.get(1,new Object[0])}); - GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("electronicCircuit", 1L), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L, new Object[0])}); - break; - case "Advanced": - GT_ModHandler.removeRecipeByOutput(aStack); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + GT_ModHandler.addCraftingRecipe(aStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1),'B',ItemList.Circuit_Board_Coated_Basic.get(1),'I',ItemList.IC2_Item_Casing_Steel.get(1)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("electronicCircuit", 1L), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L)}); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java index 3fda2ae1f7..fcbaf88746 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java @@ -4,7 +4,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IOreRecipeRegistrator; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import net.minecraft.item.ItemStack; @@ -13,9 +13,10 @@ public class ProcessingCompressed implements IOreRecipeRegistrator { OrePrefixes.compressed.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new GT_RenderedTexture(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + GregTech_API.registerCover(aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); //GT_RecipeRegistrator.registerUsagesForMaterials(null, false, GT_Utility.copyAmount(1L, aStack)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index 90b6c83c6f..edaf2adcf4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -15,77 +15,76 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg OrePrefixes.crafting.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aOreDictName) { case "craftingQuartz": - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 3, 32767), GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Concrete.getMolten(144L), new ItemStack(net.minecraft.init.Items.comparator, 1, 0), 800, 1); + GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 3, 32767), GT_Utility.copyAmount(1L, aStack), Materials.Concrete.getMolten(144L), new ItemStack(net.minecraft.init.Items.comparator, 1, 0), 800, 1); break; case "craftingWireCopper": - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getIC2Item("frequencyTransmitter", 1L), 800, 1); - break; case "craftingWireTin": - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getIC2Item("frequencyTransmitter", 1L), 800, 1); + GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L), GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getIC2Item("frequencyTransmitter", 1L), 800, 1); break; case "craftingLensBlue": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 900, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(1, new Object[0]), 1200, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(4, new Object[0]), 800, 1920,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalCPU.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalSoC.get(1, new Object[0]), 600, 40000,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_QPIC.get(1, new Object[0]), 2400, 500000,true); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L), 900, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_PIC.get(1), 1200, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_PIC.get(4), 800, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalCPU.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalSoC.get(1), 600, 40000, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_QPIC.get(1), 2400, 500000, true); break; case "craftingLensYellow": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_LPIC.get(1, new Object[0]), 800, 120,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_LPIC.get(4, new Object[0]), 600, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC.get(1, new Object[0]), 900, 1920,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC.get(4, new Object[0]), 900, 7680,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC.get(8, new Object[0]), 900, 30720,true); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_LPIC.get(1), 800, 120, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_LPIC.get(4), 600, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(1), 900, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(4), 900, 7680, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(8), 900, 30720, true); break; case "craftingLensOrange": - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC2.get(1, new Object[0]), 1800, 1920,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Simple_SoC.get(1, new Object[0]), 300, 64,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_NPIC.get(1, new Object[0]), 1800, 30720,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_NPIC.get(4, new Object[0]), 1800, 122880,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(1), 1800, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Simple_SoC.get(1), 300, 64, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_NPIC.get(1), 1800, 30720, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_NPIC.get(4), 1800, 122880, true); break; case "craftingLensCyan": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(1, new Object[0]), 1200, 120,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(4, new Object[0]), 900, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(8, new Object[0]), 600, 1920,true); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(1), 1200, 120, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(4), 900, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(8), 600, 1920, true); break; case "craftingLensRed": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), 50, 120); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(1, new Object[0]), 1200, 120,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(4, new Object[0]), 900, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(8, new Object[0]), 600, 1920,true); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("dreamcraft", "item.EtchedLowVoltageWiring", 1L, 0), 200, 16); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC2.get(2, new Object[0]), 1800, 7680,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC2.get(4, new Object[0]), 1800, 30720,true); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), 50, 120); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(1), 1200, 120, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(4), 900, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(8), 600, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("dreamcraft", "item.EtchedLowVoltageWiring", 1L, 0), 200, 16); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(2), 1800, 7680, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(4), 1800, 30720, true); break; case "craftingLensGreen": - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalCPU.get(1, new Object[0]), 600, 10000,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalSoC.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalSoC2.get(1, new Object[0]), 1200, 80000,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ULPIC.get(2, new Object[0]), 600, 30,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ULPIC.get(8, new Object[0]), 600, 120,false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(16, new Object[0]), 600, 7680,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(32, new Object[0]), 600, 30720,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalCPU.get(1), 600, 10000, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalSoC.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalSoC2.get(1), 1200, 80000, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ULPIC.get(2), 600, 30, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ULPIC.get(8), 600, 120, false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(16), 600, 7680, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(32), 600, 30720, true); break; case "craftingLensWhite": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.sandstone, 1, 2), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.sandstone, 1, 1), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.stonebrick, 1, 3), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.quartz_block, 1, 1), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(1, new Object[0]), 1200, 120,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(4, new Object[0]), 900, 480,true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(8, new Object[0]), 600, 1920,true); + GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.sandstone, 1, 2), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.sandstone, 1, 1), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.stonebrick, 1, 3), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.quartz_block, 1, 1), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(1), 1200, 120, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(4), 900, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(8), 600, 1920, true); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java index 6bfbf7cd37..49e369732b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java @@ -20,24 +20,24 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist boolean aSpecialRecipeReq2 = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING); switch (aPrefix) { case crateGtDust: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L)), ItemList.Crate_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), ItemList.Crate_Empty.get(1L, new Object[0]), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", Character.valueOf('X'), OrePrefixes.crateGtDust.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); + if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtDust.get(aMaterial)}); break; case crateGtIngot: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L)), ItemList.Crate_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), ItemList.Crate_Empty.get(1L, new Object[0]), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", Character.valueOf('X'), OrePrefixes.crateGtIngot.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); + if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtIngot.get(aMaterial)}); break; case crateGtGem: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L)), ItemList.Crate_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), ItemList.Crate_Empty.get(1L, new Object[0]), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", Character.valueOf('X'), OrePrefixes.crateGtGem.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); + if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtGem.get(aMaterial)}); break; case crateGtPlate: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L)), ItemList.Crate_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), ItemList.Crate_Empty.get(1L, new Object[0]), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", Character.valueOf('X'), OrePrefixes.crateGtPlate.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); + if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtPlate.get(aMaterial)}); break; default: break; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java index ac38b2843b..f67fb8ebe8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java @@ -13,34 +13,45 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.crop.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, net.minecraft.item.ItemStack aStack) { - GT_ModHandler.addCompressionRecipe(gregtech.api.util.GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.IC2_PlantballCompressed.get(1L, new Object[0])); - if (aOreDictName.equals("cropTea")) { - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.tea"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.tea"), false); - } else if (aOreDictName.equals("cropGrape")) { - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.grapejuice"), false); - } else if (aOreDictName.equals("cropChilipepper")) { - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); - } else if (aOreDictName.equals("cropCoffee")) { - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); - } else if (aOreDictName.equals("cropPotato")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Raw_PotatoChips.get(1L, new Object[0]), 64, 4); - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Stripes.get(0L, new Object[0]), ItemList.Food_Raw_Fries.get(1L, new Object[0]), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.potatojuice"), true); - } else if (aOreDictName.equals("cropLemon")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Lemon.get(4L, new Object[0]), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.getFluid("potion.vodka"), FluidRegistry.getFluid("potion.leninade"), true); - } else if (aOreDictName.equals("cropTomato")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Tomato.get(4L, new Object[0]), 64, 4); - } else if (aOreDictName.equals("cropCucumber")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Cucumber.get(4L, new Object[0]), 64, 4); - } else if (aOreDictName.equals("cropOnion")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Onion.get(4L, new Object[0]), 64, 4); + GT_ModHandler.addCompressionRecipe(gregtech.api.util.GT_Utility.copyAmount(8L, aStack), ItemList.IC2_PlantballCompressed.get(1L)); + switch (aOreDictName) { + case "cropTea": + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.tea"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.tea"), false); + break; + case "cropGrape": + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.grapejuice"), false); + break; + case "cropChilipepper": + GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); + break; + case "cropCoffee": + GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); + break; + case "cropPotato": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Raw_PotatoChips.get(1L), 64, 4); + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Stripes.get(0L), ItemList.Food_Raw_Fries.get(1L), 64, 4); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.potatojuice"), true); + break; + case "cropLemon": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Lemon.get(4L), 64, 4); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.lemonjuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.getFluid("potion.vodka"), FluidRegistry.getFluid("potion.leninade"), true); + break; + case "cropTomato": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Tomato.get(4L), 64, 4); + break; + case "cropCucumber": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cucumber.get(4L), 64, 4); + break; + case "cropOnion": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Onion.get(4L), 64, 4); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java index d86075e375..fd500b258a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java @@ -14,24 +14,25 @@ public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeR OrePrefixes.crushedPurified.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case crushedCentrifuged: - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(2, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(2, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); break; case crushedPurified: - GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L)}); + GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L)); ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); if(tGem!=null){ switch (aMaterial.mName) { case "Tanzanite": case "Sapphire": case "Olivine": case "GreenSapphire": case "Opal": case "Amethyst": case "Emerald": case "Ruby": case "Amber": case "Diamond": case "FoolsRuby": case "BlueTopaz": case "GarnetRed": case "Topaz": case "Jasper": case "GarnetYellow": - GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{300, 1200, 4500, 1400, 2800, 3500}, 800, 16); + GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{300, 1200, 4500, 1400, 2800, 3500}, 800, 16); break; default: - GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{100, 400, 1500, 2000, 4000, 5000}, 800, 16); + GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{100, 400, 1500, 2000, 4000, 5000}, 800, 16); }} break; default: diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java index 8a4e11569e..cc3fbcf49b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java @@ -14,8 +14,9 @@ public class ProcessingCrystallized implements gregtech.api.interfaces.IOreRecip OrePrefixes.crystalline.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), null, 10, false); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), null, 10, false); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java index 4c30777c3c..ca73118d20 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java @@ -17,25 +17,26 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.dirtyGravel.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, net.minecraft.item.ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); - GT_ModHandler.addOreWasherRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 1000, new Object[]{GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)}); - GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), new Object[]{GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)}); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), 10, 16); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); + GT_ModHandler.addOreWasherRecipe(GT_Utility.copyAmount(1L, aStack), 1000, GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); + GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); if (aMaterial.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); if (aMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); if (aMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); for (Materials tMaterial : aMaterial.mOreByProducts) { if (tMaterial.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); if (tMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); if (tMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java index 27871e7648..75164ce608 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java @@ -19,17 +19,18 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.dustTiny.add(this); } + @Override 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, new Object[]{aStack}), null, aMaterial.mFuelPower, aMaterial.mFuelType); + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); if (GT_Utility.getFluidForFilledItem(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), true) == null) - GT_Values.RA.addCannerRecipe(aStack, ItemList.Cell_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), null, 100, 1); + GT_Values.RA.addCannerRecipe(aStack, ItemList.Cell_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), null, 100, 1); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack}), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); } } @@ -38,19 +39,19 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr if (aMaterial.mBlastFurnaceRequired) { GT_ModHandler.removeFurnaceSmelting(aStack); if(aMaterial.mAutoGenerateBlastFurnaceRecipes) - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); + GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, tDustStack), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); if (aMaterial.mBlastFurnaceTemp <= 1000) { - GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(1L, new Object[]{tDustStack}), aMaterial.mBlastFurnaceTemp); + GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(1L, tDustStack), aMaterial.mBlastFurnaceTemp); } } else { GT_ModHandler.addSmeltingRecipe(aStack, tDustStack); } } else if (!aMaterial.contains(SubTag.NO_WORKING)) { if ((!OrePrefixes.block.isIgnored(aMaterial)) && (null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L))) { - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); + GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); } if (((OrePrefixes.block.isIgnored(aMaterial)) || (null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))) && (aMaterial != Materials.GraniteRed) && (aMaterial != Materials.GraniteBlack) && (aMaterial != Materials.Basalt) && (aMaterial != Materials.Marble) && (aMaterial != Materials.Glass) && (aMaterial != Materials.Obsidian) && (aMaterial != Materials.Glowstone) && (aMaterial != Materials.Paper)) { - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)); + GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)); } } @@ -63,7 +64,7 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr for (MaterialStack tMat : aMaterial.mMaterialList) if (tMat.mAmount > 0L) { if (tMat.mMaterial == Materials.Air) { - tDustStack = ItemList.Cell_Air.get(tMat.mAmount / 2L, new Object[0]); + tDustStack = ItemList.Cell_Air.get(tMat.mAmount / 2L); } else { tDustStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); if (tDustStack == null) @@ -72,15 +73,14 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr if (tItemAmount + tMat.mAmount * 3628800L <= aStack.getMaxStackSize() * aMaterial.getDensity()) { tItemAmount += tMat.mAmount * 3628800L; if (tDustStack != null) { - ItemStack tmp793_791 = tDustStack; - tmp793_791.stackSize = ((int) (tmp793_791.stackSize * tDensityMultiplier)); + 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, new Object[]{tDustStack})); + tList.add(GT_Utility.copyAmount(64L, tDustStack)); tDustStack.stackSize -= 64; } - if ((tDustStack.stackSize > 0) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tDustStack}) <= 64L)) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tDustStack}); + if ((tDustStack.stackSize > 0) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tDustStack) <= 64L)) { + tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tDustStack); tList.add(tDustStack); } } @@ -93,78 +93,59 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr for (int i = 0; i < tList_sS; i++) { if ((!ItemList.Cell_Air.isStackEqual(tList.get(i))) && ((tFluid = GT_Utility.getFluidForFilledItem((ItemStack) tList.get(i), true)) != null)) { tFluid.amount *= ((ItemStack) tList.get(i)).stackSize; - tCapsuleCount -= GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{(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, new Object[]{aStack}), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount, new Object[0]) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), Math.min(4, tList.size()) * 30); if ((aMaterial.mExtraData & 0x2) != 0) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount, new Object[0]) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getMass() * 4L * tItemAmount)), Math.min(4, tList.size()) * 5); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getMass() * 4L * tItemAmount)), Math.min(4, tList.size()) * 5); } } } if (aMaterial.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 7000, 2000, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 7000, 2000, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); } switch (aMaterial.mName) { case "NULL": break; case "Glass": - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(net.minecraft.init.Blocks.glass)); + GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack(net.minecraft.init.Blocks.glass)); break; case "NetherQuartz": case "Quartz": case "CertusQuartz": if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "QuartzDustSmeltingIntoAESilicon", true)) GT_ModHandler.removeFurnaceSmelting(aStack); break; case "MeatRaw": - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L)); + GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L)); break; case "Mercury": - // System.err.println("Quicksilver Dust?, To melt that, you don't even need a Furnace..."); break; - // case "Tetrahedrite": case "Chalcopyrite": case "Malachite": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 6L)); - // break; - //case "Pentlandite": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 6L)); - // break; - //case "Garnierite": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 1L)); - // break; - //case "Cassiterite": case "CassiteriteSand": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L)); - // break; - //case "Magnetite": case "VanadiumMagnetite": case "BasalticMineralSand": case "GraniticMineralSand": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 3L)); - // break; - //case "YellowLimonite": case "BrownLimonite": case "BandedIron": - // GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L)); - // break; case "Oilsands": - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true,new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})},null,null,null,new FluidStack[]{Materials.OilHeavy.getFluid(1000)},660,8,0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(1L, aStack)}, null, null, null, new FluidStack[]{Materials.OilHeavy.getFluid(1000)}, 660, 8, 0); break; case "Coal": if (GT_Mod.gregtechproxy.mTEMachineRecipes) - GT_ModHandler.addLiquidTransposerFillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), 125); + GT_ModHandler.addLiquidTransposerFillRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), 125); break; case "HydratedCoal": if (GT_Mod.gregtechproxy.mTEMachineRecipes) - GT_ModHandler.addLiquidTransposerEmptyRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), 125); - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)); + GT_ModHandler.addLiquidTransposerEmptyRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), 125); + GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)); break; case "Diamond": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 32, ItemList.IC2_Industrial_Diamond.get(3L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 16L)); + GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 32, ItemList.IC2_Industrial_Diamond.get(3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 16L)); break; case "Opal": case "Olivine": case "Emerald": case "Ruby": case "Sapphire": case "GreenSapphire": case "Topaz": case "BlueTopaz": case "Tanzanite": case "Amethyst": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 24, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L)); + GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 24, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L)); break; case "FoolsRuby": case "GarnetRed": case "GarnetYellow": case "Jasper": case "Amber": case "Monazite": case "Forcicium": case "Forcillium": case "Force": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 16, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 8L)); + GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 16, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 8L)); } break; case dustPure: case dustImpure:case dustRefined: @@ -172,17 +153,17 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr if (aPrefix == OrePrefixes.dustPure) { if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) { - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); } } if (aMaterial.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 2000, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(2), gregtech.api.util.GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9500, 1500, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 2000, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), gregtech.api.util.GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9500, 1500, 24, false); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); } ItemStack tImpureStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), 1L); @@ -193,57 +174,46 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr if (tImpureStack == null) { tImpureStack = GT_OreDictUnificator.get(OrePrefixes.cell, tByProduct, 1L); if (tImpureStack == null) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass())); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass())); } else { FluidStack tFluid = GT_Utility.getFluidForFilledItem(tImpureStack, true); if (tFluid == null) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), 1, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, aStack), 1, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); } else { tFluid.amount /= 10; - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, tFluid, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 8L), 5); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, tFluid, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 8L), 5); } } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 16L)); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 16L)); } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 8L)); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 8L)); } break; case dustSmall: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Schematic_Dust.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 100, 4); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Schematic_Dust.get(0L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 100, 4); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack}), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); } } - if (aMaterial.mBlastFurnaceRequired) { - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); - } else { - gregtech.api.util.GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Shape_Mold_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 130, 3, true); - } break; case dustTiny: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), ItemList.Schematic_Dust.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 100, 4); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Schematic_Dust.get(0L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 100, 4); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack}), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); } } if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) { if (aMaterial.mBlastFurnaceRequired) { - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 9L, new Object[0]), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); GT_ModHandler.removeFurnaceSmelting(aStack); - } else { - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mSmeltInto, 1L)); - GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), ItemList.Shape_Mold_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 130, 3, true); } } break; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java index 65942f42a2..abfa47e570 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java @@ -19,15 +19,16 @@ public class ProcessingDye implements IOreRecipeRegistrator { OrePrefixes.dye.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { Dyes aDye = Dyes.get(aOreDictName); if ((aDye.mIndex >= 0) && (aDye.mIndex < 16) && (GT_Utility.getContainerItem(aStack, true) == null)) { - GT_ModHandler.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); - GT_ModHandler.addAlloySmelterRecipe(new ItemStack(Blocks.glass, 8, 32767), GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 192), null, 16, 4); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 216), null, 16, 4); - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(Locale.ENGLISH), 288), GT_Values.NI, 600, 48); + GT_ModHandler.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); + GT_ModHandler.addAlloySmelterRecipe(new ItemStack(Blocks.glass, 8, 32767), GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); + GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, aStack), null, null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 192), null, 16, 4); + GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, aStack), null, null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 216), null, 16, 4); + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(Locale.ENGLISH), 288), GT_Values.NI, 600, 48); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java index 23167d218c..93cf4e4f10 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java @@ -15,13 +15,14 @@ public class ProcessingFineWire implements gregtech.api.interfaces.IOreRecipeReg OrePrefixes.wireFine.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copy(new Object[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), GT_Utility.copyAmount(4L, new Object[]{aStack})}), 100, 4); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Utility.copy(new Object[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Utility.copyAmount(2L, new Object[]{aStack})}), 50, 4); + GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copy(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), GT_Utility.copyAmount(8L, aStack)), 100, 4); + GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Utility.copy(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Utility.copyAmount(4L, aStack)), 50, 4); } if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Proxy.tBits, new Object[]{"Xx", Character.valueOf('X'), OrePrefixes.foil.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), GT_Proxy.tBits, new Object[]{"Xx", 'X', OrePrefixes.foil.get(aMaterial)}); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java index ae3e28b0b9..5d539db902 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java @@ -5,7 +5,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IOreRecipeRegistrator; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; @@ -15,10 +15,9 @@ public class ProcessingFoil implements IOreRecipeRegistrator { OrePrefixes.foil.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { -// if (!aMaterial.contains(SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L)), GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 4L), (int) Math.max(aMaterial.getMass(), 1L), 24); -// } - GregTech_API.registerCover(aStack, new GT_RenderedTexture(aMaterial.mIconSet.mTextures[70], aMaterial.mRGBa, false), null); + GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L)), GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 4L), (int) Math.max(aMaterial.getMass(), 1L), 24); + GregTech_API.registerCover(aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[70], aMaterial.mRGBa, false), null); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java index 7d5f976bd6..771ff840f6 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java @@ -4,7 +4,6 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -15,23 +14,24 @@ public class ProcessingFood implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.food.add(this); } + @Override 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, new Object[0]), ItemList.Food_Sliced_Cheese.get(4L, new Object[0]), 64, 4); - GT_OreDictUnificator.addItemData(aStack, new gregtech.api.objects.ItemData(Materials.Cheese, 3628800L, new MaterialStack[0])); + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cheese.get(4L), 64, 4); + GT_OreDictUnificator.addItemData(aStack, new gregtech.api.objects.ItemData(Materials.Cheese, 3628800L)); break; case "foodDough": GT_ModHandler.removeFurnaceSmelting(aStack); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Food_Flat_Dough.get(1L, new Object[0]), 16, 4); + GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Food_Flat_Dough.get(1L), 16, 4); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), null, null, null, null, ItemList.Food_Dough_Sugar.get(2L, new Object[0]), 32, 8); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L, new Object[0]), 32, 8); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chocolate, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L, new Object[0]), 32, 8); + GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), null, null, null, null, ItemList.Food_Dough_Sugar.get(2L), 32, 8); + GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L), 32, 8); + GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chocolate, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L), 32, 8); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Mold_Bun.get(0L, new Object[0]), ItemList.Food_Raw_Bun.get(1L, new Object[0]), 128, 4); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Bread.get(0L, new Object[0]), ItemList.Food_Raw_Bread.get(1L, new Object[0]), 256, 4); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Mold_Baguette.get(0L, new Object[0]), ItemList.Food_Raw_Baguette.get(1L, new Object[0]), 384, 4); + GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Mold_Bun.get(0L), ItemList.Food_Raw_Bun.get(1L), 128, 4); + GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Bread.get(0L), ItemList.Food_Raw_Bread.get(1L), 256, 4); + GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Shape_Mold_Baguette.get(0L), ItemList.Food_Raw_Baguette.get(1L), 384, 4); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java index 8244688bd9..90bf5c4670 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java @@ -14,31 +14,32 @@ public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.gearGtSmall.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case gearGt: - GT_ModHandler.removeRecipeByOutput(aStack); + GT_ModHandler.removeRecipeByOutputDelayed(aStack); if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L, new Object[0]), aMaterial.getMolten(576L), GT_OreDictUnificator.get(aPrefix, aMaterial, 1L), 128, 8); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), aMaterial.getMolten(576L), GT_OreDictUnificator.get(aPrefix, aMaterial, 1L), 128, 8); } if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aMaterial.mName) { case "Wood": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PsP", "SPS", Character.valueOf('P'), OrePrefixes.plank.get(aMaterial), Character.valueOf('S'), OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PsP", "SPS", 'P', OrePrefixes.plank.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); break; case "Stone": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PfP", "SPS", Character.valueOf('P'), OrePrefixes.stoneSmooth, Character.valueOf('S'), new ItemStack(Blocks.stone_button, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PfP", "SPS", 'P', OrePrefixes.stoneSmooth, 'S', new ItemStack(Blocks.stone_button, 1, 32767)}); break; default: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PwP", "SPS", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('S'), OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PwP", "SPS", 'P', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); } } break; case gearGtSmall: if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), aMaterial.getMolten(144L), GT_Utility.copyAmount(1L, aStack), 16, 8); } if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aMaterial.mName) { diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java index b10993a0bb..3bd18a3dc2 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java @@ -18,6 +18,7 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra OrePrefixes.gemFlawless.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { long aMaterialMass = aMaterial.getMass(); boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING); @@ -69,7 +70,7 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra case "Coal": case "Charcoal": if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false)) { - GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, new ItemStack(net.minecraft.init.Items.stick, 1, 0)); + GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack), null, null, new ItemStack(net.minecraft.init.Items.stick, 1, 0)); } break; case "CertusQuartz": @@ -101,7 +102,6 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra if (aFuelPower) GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); if (!aNoWorking) { -// GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 3L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount * 3L), (int) Math.max(aMaterialMass * 10L, 1L), 16); 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)}); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java index 773b1438a6..55201276cc 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java @@ -19,6 +19,7 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.ingotHot.add(this); } + @Override 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); @@ -48,14 +49,11 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { if (!aMaterial.contains(SubTag.SMELTING_TO_GEM)) - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"XXX", "XXX", "XXX", Character.valueOf('X'), OrePrefixes.nugget.get(aMaterial)}); if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.ingot.get(aMaterial)}); } if (!aNoSmashing) { - //GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copy(new Object[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 8L)}), 100, 4); - //GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), 100, 4); GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(3L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), (int) Math.max(aMaterialMass, 1L), 16); GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 24); GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 96); @@ -65,7 +63,6 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterialMass * 9L, 1L), 96); } - //GT_RecipeRegistrator.registerUsagesForMaterials(OrePrefixes.plate.get(aMaterial).toString(), !aNoSmashing, GT_Utility.copyAmount(1L, aStack)); break; case ingotDouble: if (!aNoSmashing) { diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java index 271a7cc337..d95e9466b5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java @@ -4,7 +4,6 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -15,30 +14,31 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr 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") && !aOreDictName.equals("itemNetherQuartz")) { switch (aOreDictName) { case "itemSilicon": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L, new MaterialStack[0])); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L)); + GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16); case "itemWheat": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L)); case "itemManganese": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L)); case "itemSalt": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L)); case "itemMagnesium": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L)); case "itemPhosphorite": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.TricalciumPhosphate, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.TricalciumPhosphate, 3628800L)); case "itemSulfur": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L)); case "itemAluminum": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L)); case "itemSaltpeter": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L)); case "itemUranium": - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L)); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index 15c435f3b3..c18fcc2efc 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -5,8 +5,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; @@ -15,12 +14,10 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.lens.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - switch (aMaterial.mName) { + switch (aMaterial.mName) { case "Diamond": - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), 1200, 30); - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 2400, 16); - break; case "Glass": GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), 1200, 30); GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 2400, 16); @@ -28,7 +25,7 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr default: GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), 1200, 120); GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), 2400, 30); - GregTech_API.registerCover(aStack, new GT_MultiTexture(new gregtech.api.interfaces.ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)}), new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); - } + GregTech_API.registerCover(aStack, TextureFactory.of(Textures.BlockIcons.MACHINE_CASINGS[2][0], TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)), new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); + } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index 6876f4b99f..dfccc35684 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -14,29 +14,31 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra OrePrefixes.log.add(this); } + @Override 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, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(2), null, Materials.Methane.getGas(60L), ItemList.IC2_Resin.get(1L, new Object[0]), GT_ModHandler.getIC2Item("plantBall", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), GT_Values.NI, GT_Values.NI, new int[]{5000, 3750, 2500, 2500}, 200, 20); - GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Resin.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L)); - GT_ModHandler.addExtractionRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), ItemList.IC2_Resin.get(1L, new Object[0]), 33, false); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), null, Materials.Methane.getGas(60L), ItemList.IC2_Resin.get(1L), GT_ModHandler.getIC2Item("plantBall", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), GT_Values.NI, GT_Values.NI, new int[]{5000, 3750, 2500, 2500}, 200, 20); + GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Resin.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L)); + GT_ModHandler.addExtractionRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), ItemList.IC2_Resin.get(1L), 33, false); } else { - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), null, Materials.Methane.getGas(60L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 200, 20); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); } - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sLf", 'L', GT_Utility.copyAmount(1L, new Object[]{aStack})}); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), 64, 16); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sLf", 'L', GT_Utility.copyAmount(1L, aStack)}); + GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L), 16, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L), 64, 16); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); short aMeta = (short) aStack.getItemDamage(); if (aMeta == Short.MAX_VALUE) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } for (int i = 0; i < 32767; i++) { @@ -46,7 +48,7 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); } } - ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(aStack.getItem(), 1, i)}); + ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i)); if (tStack == null) { if (i >= 16) { break; @@ -54,55 +56,54 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } else { - - ItemStack tPlanks = GT_Utility.copy(new Object[]{tStack}); + ItemStack tPlanks = GT_Utility.copy(tStack); tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(new Object[]{tPlanks}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, new Object[]{tStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); + GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); + GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); GT_ModHandler.addSawmillRecipe(new ItemStack(aStack.getItem(), 1, i), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); - GT_ModHandler.removeRecipe(new ItemStack[]{new ItemStack(aStack.getItem(), 1, i)}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, new Object[]{tStack}), 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), new Object[]{tStack}), new Object[]{new ItemStack(aStack.getItem(), 1, i)}); + GT_ModHandler.removeRecipeDelayed(new ItemStack(aStack.getItem(), 1, i)); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"s", "L", 'L', new ItemStack(aStack.getItem(), 1, i)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{new ItemStack(aStack.getItem(), 1, i)}); } } } else { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } - ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); + ItemStack tStack = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1L, aStack)); if (tStack != null) { - ItemStack tPlanks = GT_Utility.copy(new Object[]{tStack}); + ItemStack tPlanks = GT_Utility.copy(tStack); tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Lubricant.getFluid(1L), GT_Utility.copy(new Object[]{tPlanks}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, new Object[]{tStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); - GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); - GT_ModHandler.removeRecipe(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, new Object[]{tStack}), new Object[]{"s", "L", 'L', GT_Utility.copyAmount(1L, new Object[]{aStack})}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), new Object[]{tStack}), new Object[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); + GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); + GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack)); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), new Object[]{"s", "L", 'L', GT_Utility.copyAmount(1L, aStack)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), new Object[]{GT_Utility.copyAmount(1L, aStack)}); } } - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } public static void addPyrolyeOvenRecipes(ItemStack logStack){ - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 1, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), Materials.Nitrogen.getGas(1000), 2, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 3, Materials.Ash.getDust(4), Materials.OilHeavy.getFluid(200), 320, 192); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 3, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), Materials.Nitrogen.getGas(1000), 4, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 5, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), Materials.Nitrogen.getGas(1000), 6, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 7, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), Materials.Nitrogen.getGas(1000), 8, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), GT_Values.NF, 9, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[]{logStack}), Materials.Nitrogen.getGas(1000), 10, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 1, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 2, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, Materials.Ash.getDust(4), Materials.OilHeavy.getFluid(200), 320, 192); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 4, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 5, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 6, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 7, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 8, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 9, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 10, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 320, 96); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java index f34b3d10a2..8da7478053 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java @@ -12,22 +12,20 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis OrePrefixes.nugget.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aMaterial == Materials.Iron) - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 1L)); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), aMaterial.contains(SubTag.SMELTING_TO_GEM) ? ItemList.Shape_Mold_Ball.get(0L, new Object[0]) : ItemList.Shape_Mold_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 200, 2); + GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 1L)); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, aStack), aMaterial.contains(SubTag.SMELTING_TO_GEM) ? ItemList.Shape_Mold_Ball.get(0L) : ItemList.Shape_Mold_Ingot.get(0L), GT_OreDictUnificator.get(aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 200, 2); if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4); } GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); if (!aMaterial.contains(SubTag.NO_SMELTING)) { - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), GT_Utility.copyAmount(9L, new Object[]{aStack}), 100, 1); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), new Object[]{"sI ", 'I', OrePrefixes.ingot.get(aMaterial)}); - //if ((GT_ModHandler.getSmeltingOutput(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), false, null) == null) && (GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mSmeltInto, 1L) != null) && (!GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copyAmount(9L, new Object[]{aStack})))) { - // GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), new Object[]{aOreDictName}); - //} + GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Mold_Nugget.get(0L), GT_Utility.copyAmount(9L, aStack), 100, 1); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sI ", 'I', OrePrefixes.ingot.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java index 4530023908..f306fa2282 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java @@ -18,13 +18,14 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra tPrefix.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { boolean tIsRich = (aPrefix == OrePrefixes.oreNetherrack) || (aPrefix == OrePrefixes.oreNether) || (aPrefix == OrePrefixes.oreEndstone) || (aPrefix == OrePrefixes.oreEnd) || (aPrefix == OrePrefixes.oreRich) || (aPrefix == OrePrefixes.oreDense); if (aMaterial == Materials.Oilsands) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, Materials.OilHeavy.getFluid(tIsRich ? 4000L : 2000L), new ItemStack(net.minecraft.init.Blocks.sand, 1, 0), null, null, null, null, null, new int[]{tIsRich ? 2000 : 4000}, tIsRich ? 600 : 300, 30); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, Materials.OilHeavy.getFluid(tIsRich ? 4000L : 2000L), new ItemStack(net.minecraft.init.Blocks.sand, 1, 0), null, null, null, null, null, new int[]{tIsRich ? 2000 : 4000}, tIsRich ? 600 : 300, 30); } else { - registerStandardOreRecipes(aPrefix, aMaterial, GT_Utility.copyAmount(1L, new Object[]{aStack}), Math.max(1, gregtech.api.GregTech_API.sOPStuff.get(gregtech.api.enums.ConfigCategories.Materials.oreprocessingoutputmultiplier, aMaterial.toString(), 1)) * (tIsRich ? 2 : 1)); + registerStandardOreRecipes(aPrefix, aMaterial, GT_Utility.copyAmount(1L, aStack), Math.max(1, gregtech.api.GregTech_API.sOPStuff.get(gregtech.api.enums.ConfigCategories.Materials.oreprocessingoutputmultiplier, aMaterial.toString(), 1)) * (tIsRich ? 2 : 1)); } } @@ -35,7 +36,7 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra Materials tMaterial = aMaterial.mOreReplacement; Materials tPrimaryByMaterial = null; aMultiplier = Math.max(1, aMultiplier); - aOreStack = GT_Utility.copyAmount(1L, new Object[]{aOreStack}); + aOreStack = GT_Utility.copyAmount(1L, aOreStack); aOreStack.stackSize = 1; @@ -49,7 +50,7 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra ItemStack tPrimaryByProduct = null; if (tCrushed == null) { - tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier); + tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, tCleaned, tDust, tGem), aMaterial.mOreMultiplier * aMultiplier); } ArrayList<ItemStack> tByProductStacks = new ArrayList(); @@ -69,7 +70,7 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra } if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) { this.mAlreadyListedOres.add(aMaterial); - gregtech.api.util.GT_Recipe.GT_Recipe_Map.sByProductList.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L)}, (ItemStack[]) tByProductStacks.toArray(new ItemStack[tByProductStacks.size()]), null, null, null, null, 0, 0, 0); + gregtech.api.util.GT_Recipe.GT_Recipe_Map.sByProductList.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L)}, (ItemStack[]) tByProductStacks.toArray(new ItemStack[0]), null, null, null, null, 0, 0, 0); } if (tPrimaryByMaterial == null) @@ -83,21 +84,21 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra GT_ModHandler.removeFurnaceSmelting(aOreStack); } else { if (GT_Mod.gregtechproxy.mTEMachineRecipes) { - GT_ModHandler.addInductionSmelterRecipe(aOreStack, new ItemStack(net.minecraft.init.Blocks.sand, 1), GT_Utility.mul(aMultiplier * (aMaterial.contains(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) ? 1 : 2) * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag_Rich.get(1L, new Object[0]), 300 * aMultiplier, 10 * aMultiplier); - GT_ModHandler.addInductionSmelterRecipe(aOreStack, ItemList.TE_Slag_Rich.get(aMultiplier, new Object[0]), GT_Utility.mul(aMultiplier * (aMaterial.contains(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) ? 2 : 3) * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag.get(aMultiplier, new Object[0]), 300 * aMultiplier, 95); + GT_ModHandler.addInductionSmelterRecipe(aOreStack, new ItemStack(net.minecraft.init.Blocks.sand, 1), GT_Utility.mul(aMultiplier * (aMaterial.contains(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) ? 1 : 2) * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag_Rich.get(1L), 300 * aMultiplier, 10 * aMultiplier); + GT_ModHandler.addInductionSmelterRecipe(aOreStack, ItemList.TE_Slag_Rich.get(aMultiplier), GT_Utility.mul(aMultiplier * (aMaterial.contains(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) ? 2 : 3) * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(aMultiplier), 300 * aMultiplier, 95); } - tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto})); + tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, tSmeltInto)); } if (aMaterial.contains(SubTag.BLASTFURNACE_CALCITE_TRIPLE)) { if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag.get(1L, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)}), tSmeltInto.stackSize * 500, 120, 1500); - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag.get(1L, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)}), tSmeltInto.stackSize * 500, 120, 1500); + GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); + GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); } } else if (aMaterial.contains(SubTag.BLASTFURNACE_CALCITE_DOUBLE)) { if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag.get(1L, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)}), tSmeltInto.stackSize * 500, 120, 1500); - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, new Object[]{tSmeltInto}), ItemList.TE_Slag.get(1L, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)}), tSmeltInto.stackSize * 500, 120, 1500); + GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); + GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); } } } @@ -107,8 +108,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra } if (tCrushed != null) { - GT_Values.RA.addForgeHammerRecipe(aOreStack, GT_Utility.copy(new Object[]{GT_Utility.copyAmount(tCrushed.stackSize, new Object[]{tGem}), tCrushed}), 16, 10); - GT_ModHandler.addPulverisationRecipe(aOreStack, GT_Utility.mul(2L, new Object[]{tCrushed}), tMaterial.contains(SubTag.PULVERIZING_CINNABAR) ? GT_OreDictUnificator.get(OrePrefixes.crystal, Materials.Cinnabar, GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, new Object[]{tPrimaryByProduct}), 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, new Object[]{tPrimaryByProduct}), 1L), tPrimaryByProduct == null ? 0 : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 50, true); + GT_Values.RA.addForgeHammerRecipe(aOreStack, GT_Utility.copy(GT_Utility.copyAmount(tCrushed.stackSize, tGem), tCrushed), 16, 10); + GT_ModHandler.addPulverisationRecipe(aOreStack, GT_Utility.mul(2L, tCrushed), tMaterial.contains(SubTag.PULVERIZING_CINNABAR) ? GT_OreDictUnificator.get(OrePrefixes.crystal, Materials.Cinnabar, GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), tPrimaryByProduct == null ? 0 : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 50, true); } return true; } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java index bbd93ff23d..a74317f31e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java @@ -16,6 +16,7 @@ public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegi OrePrefixes.oreRich.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { int aMultiplier = 1; switch (aPrefix) { @@ -34,10 +35,10 @@ public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegi break; } if (aMaterial != null) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, aMultiplier), 16, 10); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 2 * aMultiplier), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), 5 * aMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 100, true); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, aMultiplier), 16, 10); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 2 * aMultiplier), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), 5 * aMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 100, true); if (aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mDirectSmelting, aMultiplier)); + GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mDirectSmelting, aMultiplier)); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java index 6690e435ce..0dfd2d36ef 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java @@ -15,15 +15,16 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe for (OrePrefixes tPrefix : this.mSmeltingPrefixes) tPrefix.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { GT_ModHandler.removeFurnaceSmelting(aStack); if (!aMaterial.contains(SubTag.NO_SMELTING)) { if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { if(aMaterial.mBlastFurnaceTemp<1000 && aMaterial.mDirectSmelting.mBlastFurnaceTemp<1000) if(aMaterial.mAutoGenerateBlastFurnaceRecipes) - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); + GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); if (aMaterial.mBlastFurnaceTemp <= 1000 && aMaterial.mDirectSmelting.mBlastFurnaceTemp <= 1000) - GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), aMaterial.mBlastFurnaceTemp * 2); + GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), aMaterial.mBlastFurnaceTemp * 2); } else { OrePrefixes outputPrefix; int outputSize; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java index cd9af3294a..a1d733506c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java @@ -30,29 +30,29 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr case pipeMedium: case pipeSmall: case pipeTiny: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 8L), new Object[]{"PPP", "h w", "PPP", 'P', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 6L), 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), 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), 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), new Object[]{"DhD", "D D", "DwD", 'D', OrePrefixes.plateDouble.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 8L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "h w", "PPP", 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 6L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PWP", "P P", "PHP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 2L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "W H", "PPP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", "P P", "PWP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"DhD", "D D", "DwD", 'D', OrePrefixes.plateDouble.get(aMaterial)}); break; case pipeRestrictiveHuge: case pipeRestrictiveLarge: case pipeRestrictiveMedium: case pipeRestrictiveSmall: case pipeRestrictiveTiny: - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Restrictive", ""), null, 1L, false, true), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, aPrefix.mSecondaryMaterial.mAmount / OrePrefixes.ring.mMaterialAmount), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) (aPrefix.mSecondaryMaterial.mAmount * 400L / OrePrefixes.ring.mMaterialAmount), 4); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Restrictive", ""), null, 1L, false, true), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, aPrefix.mSecondaryMaterial.mAmount / OrePrefixes.ring.mMaterialAmount), GT_Utility.copyAmount(1L, aStack), (int) (aPrefix.mSecondaryMaterial.mAmount * 400L / OrePrefixes.ring.mMaterialAmount), 4); break; case pipeQuadruple: - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, new Object[]{aStack}), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PP ", "PP ", " ", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 1L, false, true)}); - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 4L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 4), GT_Utility.copyAmount(1L, new Object[]{aStack}), 40 ,8); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack), GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PP ", "PP ", " ", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 1L, false, true)}); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 4L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 4), GT_Utility.copyAmount(1L, aStack), 40 , 8); break; case pipeNonuple: - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, new Object[]{aStack}), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "PPP", "PPP", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true)}); - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 9L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 9), GT_Utility.copyAmount(1L, new Object[]{aStack}), 60 ,8); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack), GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "PPP", "PPP", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true)}); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 9L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 9), GT_Utility.copyAmount(1L, aStack), 60 , 8); break; default: break; } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index ed1e360577..8b08b2dc0a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -16,40 +16,42 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.plank.add(this); } + @Override 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, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), null, 10, 8); - GT_Values.RA.addCNCRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L), 800, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.noteblock, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L), new ItemStack(Blocks.jukebox, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L), ItemList.Crate_Empty.get(1L, new Object[0]), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L), ItemList.Crate_Empty.get(1L, new Object[0]), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), ItemList.Crate_Empty.get(1L, new Object[0]), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.wooden_button, 1), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), new ItemStack(Blocks.wooden_pressure_plate, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), new ItemStack(Blocks.trapdoor, 1), 300, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), new ItemStack(Blocks.crafting_table, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 6L, new Object[0]), new ItemStack(Items.wooden_door, 1), 600, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), new ItemStack(Blocks.chest, 1), 800, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), new ItemStack(Items.book, 3), new ItemStack(Blocks.bookshelf, 1), 400, 4); + GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), null, 10, 8); + GT_Values.RA.addCNCRecipe(GT_Utility.copyAmount(4L, aStack), GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L), 800, 1); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.noteblock, 1), 200, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L), new ItemStack(Blocks.jukebox, 1), 400, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L), ItemList.Crate_Empty.get(1L), 200, 1); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L), ItemList.Crate_Empty.get(1L), 200, 1); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), ItemList.Crate_Empty.get(1L), 200, 1); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.wooden_button, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), new ItemStack(Blocks.wooden_pressure_plate, 1), 200, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 3L), new ItemStack(Blocks.trapdoor, 1), 300, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), new ItemStack(Blocks.crafting_table, 1), 400, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 6L), new ItemStack(Items.wooden_door, 1), 600, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), new ItemStack(Blocks.chest, 1), 800, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, aStack), new ItemStack(Items.book, 3), new ItemStack(Blocks.bookshelf, 1), 400, 4); if (aStack.getItemDamage() == 32767) { for (byte i = 0; i < 64; i = (byte) (i + 1)) { - ItemStack tStack = GT_Utility.copyMetaData(i, new Object[]{aStack}); - ItemStack tOutput = GT_ModHandler.getRecipeOutput(new ItemStack[]{tStack, tStack, tStack}); + ItemStack tStack = GT_Utility.copyMetaData(i, aStack); + // Get Recipe and Output, add recipe to delayed removal + ItemStack tOutput = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{tStack}), GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), null, 25, 4); - GT_ModHandler.removeRecipe(new ItemStack[]{tStack, tStack, tStack}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), new Object[]{"sP", 'P', tStack}); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, tStack), GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), null, 25, 4); + GT_ModHandler.removeRecipeDelayed(tStack, tStack, tStack); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sP", 'P', tStack}); } if((tStack == null) && (i >= 16)) break; } } else { - ItemStack tOutput = GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, aStack}); + ItemStack tOutput = !aModName.equalsIgnoreCase("thaumcraft") ? GT_ModHandler.getRecipeOutput(aStack, aStack, aStack) : GT_ModHandler.getRecipeOutputNoOreDict(aStack, aStack, aStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), null, 25, 4); - GT_ModHandler.removeRecipe(new ItemStack[]{aStack, aStack, aStack}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), new Object[]{"sP", 'P', aStack}); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), null, 25, 4); + GT_ModHandler.removeRecipeDelayed(aStack, aStack, aStack); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sP", 'P', aStack}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java index 3c2d808fa4..4a18688368 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java @@ -1,18 +1,33 @@ package gregtech.loaders.oreprocessing; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TextureSet; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.render.TextureFactory; 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 gregtech.common.GT_Proxy; +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 {//TODO COMPARE WITH OLD PLATE## generator +import static gregtech.api.enums.ConfigCategories.Recipes.harderrecipes; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.NI; +import static gregtech.api.enums.GT_Values.RA; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED; +import static gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS; +import static gregtech.common.GT_Proxy.tBits; + +public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingPlate() { OrePrefixes.plate.add(this); OrePrefixes.plateDouble.add(this); @@ -24,196 +39,563 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.itemCasing.add(this); } - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING); - boolean aNoWorking = aMaterial.contains(SubTag.NO_WORKING); - long aMaterialMass = aMaterial.getMass(); - + /** + * Register processes for the {@link ItemStack} with Ore Dictionary Name Prefix "plate" + * + * @param aPrefix always != null, the {@link OrePrefixes} of the {@link ItemStack} + * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! + * the {@link Materials} of the {@link ItemStack} + * @param aOreDictName the Ore Dictionary Name {@link String} of the {@link ItemStack} + * @param aModName the ModID {@link String} of the mod providing this {@link ItemStack} + * @param aStack always != null, the {@link ItemStack} to register + */ + @Override + 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); + final long aMaterialMass = aMaterial.getMass(); + switch (aPrefix) { case plate: - GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.removeRecipe(new ItemStack[]{aStack}); - - if (aMaterial.mStandardMoltenFluid != null) { - if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), 32, 8); - } - } - switch (aMaterial.mName) { - case "Iron": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.iron_block, 1, 0), null); - break; - case "Gold": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.gold_block, 1, 0), null); - break; - case "Diamond": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.diamond_block, 1, 0), null); - break; - case "Emerald": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.emerald_block, 1, 0), null); - break; - case "Lapis": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.lapis_block, 1, 0), null); - break; - case "Coal": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.coal_block, 1, 0), null); - break; - case "Redstone": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.redstone_block, 1, 0), null); - break; - case "Glowstone": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.glowstone, 1, 0), null); - break; - case "NetherQuartz": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.quartz_block, 1, 0), null); - break; - case "Obsidian": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.obsidian, 1, 0), null); - break; - case "Stone": - GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.stone, 1, 0), null); - break; - case "GraniteBlack": - GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_SMOOTH), null); - break; - case "GraniteRed": - GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_SMOOTH), null); - break; - case "Basalt": - GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.BASALT_SMOOTH), null); - break; - case "Marble": - GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.MARBLE_SMOOTH), null); - break; - case "Concrete": - GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.CONCRETE_LIGHT_SMOOTH), null); - break; - default: - GregTech_API.registerCover(aStack, new GT_RenderedTexture(aMaterial.mIconSet.mTextures[71], aMaterial.mRGBa, false), null); - } - - if (aMaterial.mFuelPower > 0) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower, aMaterial.mFuelType); - GT_Utility.removeSimpleIC2MachineRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_ModHandler.getCompressorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)); - //DISABLED, moved to 3ple plate//GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(aMaterial == Materials.MeteoricIron ? 1 : 2, new Object[]{aStack}), 2, GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"hX", 'X', OrePrefixes.plate.get(aMaterial)}); - - if (aMaterial == Materials.Paper) - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2L : 3L, new Object[]{aStack}), new Object[]{"XXX", 'X', new ItemStack(net.minecraft.init.Items.reeds, 1, 32767)}); - - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - if (!aNoSmashing && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h", "X", "X", 'X', OrePrefixes.ingot.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', OrePrefixes.ingot.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.gem.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', OrePrefixes.gem.get(aMaterial)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.ingotDouble.get(aMaterial)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"H", "X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', OrePrefixes.ingotDouble.get(aMaterial)}); - } - if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.plate.get(aMaterial)}); - } + registerPlate(aMaterial, aStack, aNoSmashing); break; case plateDouble: - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new gregtech.api.objects.GT_RenderedTexture(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); - if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 96); - if (GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Tools.hammerdoubleplate, OrePrefixes.plate.get(aMaterial).toString(), true)) { - Object aPlateStack = OrePrefixes.plate.get(aMaterial); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"I", "B", "h", 'I', aPlateStack, 'B', aPlateStack}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, aPlateStack}); - } - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.max(aMaterialMass * 2L, 1L), 96); - } else { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.Glue.getFluid(10L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 64, 8); - } + registerPlateDouble(aMaterial, aStack, aNoSmashing, aMaterialMass); break; case plateTriple: - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new gregtech.api.objects.GT_RenderedTexture(aMaterial.mIconSet.mTextures[73], aMaterial.mRGBa, false), null); - if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterialMass * 3L, 1L), 96); - if (GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Tools.hammertripleplate, OrePrefixes.plate.get(aMaterial).toString(), true)) { - Object aPlateStack = OrePrefixes.plate.get(aMaterial); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"I", "B", "h", 'I', OrePrefixes.plateDouble.get(aMaterial), 'B', aPlateStack}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, aPlateStack, aPlateStack}); - } - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 3L), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.max(aMaterialMass * 3L, 1L), 96); - }else { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 3L), gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), Materials.Glue.getFluid(20L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 96, 8); - } - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 2, GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));//added + registerPlateTriple(aMaterial, aStack, aNoSmashing, aMaterialMass); break; case plateQuadruple: - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new gregtech.api.objects.GT_RenderedTexture(aMaterial.mIconSet.mTextures[74], aMaterial.mRGBa, false), null); - if (!aNoWorking) - GT_Values.RA.addCNCRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 30); - if (!aNoSmashing) { - if (GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Tools.hammerquadrupleplate, OrePrefixes.plate.get(aMaterial).toString(), true)) { - Object aPlateStack = OrePrefixes.plate.get(aMaterial); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"I", "B", "h", 'I', OrePrefixes.plateTriple.get(aMaterial), 'B', aPlateStack}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, aPlateStack, aPlateStack, aPlateStack}); - } - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.max(aMaterialMass * 4L, 1L), 96); - } else { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), Materials.Glue.getFluid(30L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 128, 8); - } + registerPlateQuadruple(aMaterial, aStack, aNoSmashing, aMaterialMass, aNoWorking); break; case plateQuintuple: - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new gregtech.api.objects.GT_RenderedTexture(aMaterial.mIconSet.mTextures[75], aMaterial.mRGBa, false), null); - if (!aNoSmashing) { - if (GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Tools.hammerquintupleplate, OrePrefixes.plate.get(aMaterial).toString(), true)) { - Object aPlateStack = OrePrefixes.plate.get(aMaterial); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"I", "B", "h", 'I', OrePrefixes.plateQuadruple.get(aMaterial), 'B', aPlateStack}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{ToolDictNames.craftingToolForgeHammer, aPlateStack, aPlateStack, aPlateStack, aPlateStack, aPlateStack}); - } - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 5L), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.max(aMaterialMass * 5L, 1L), 96); - } else { - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 5L), ItemList.Circuit_Integrated.getWithDamage(0L, 5L, new Object[0]), Materials.Glue.getFluid(40L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 160, 8); - } + registerPlateQuintuple(aMaterial, aStack, aNoSmashing, aMaterialMass); break; case plateDense: - GT_ModHandler.removeRecipeByOutput(aStack); - GregTech_API.registerCover(aStack, new GT_RenderedTexture(aMaterial.mIconSet.mTextures[76], aMaterial.mRGBa, false), null); - if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) Math.max(aMaterialMass * 9L, 1L), 96); - } + registerPlateDense(aMaterial, aStack, aNoSmashing, aMaterialMass); break; case itemCasing: - GT_ModHandler.removeRecipeByOutput(aStack); - if (aMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L, new Object[0]), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), 16, 8); - } - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - if (!aNoSmashing && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h X", 'X', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"H X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', OrePrefixes.plate.get(aMaterial)}); - } - } - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 2L), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_Utility.copyAmount(3L, new Object[]{aStack}), 128, 15); - GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 2L), null, (int) Math.max(aMaterial.getMass(), 1L), 16); - GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 2L), (int) Math.max(aMaterial.getMass(), 1L), 45); - GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); + registerItemCasing(aPrefix, aMaterial, aStack, aNoSmashing); break; - case plateAlloy: - switch (aOreDictName) { - case "plateAlloyCarbon": - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("generator", 1L), GT_Utility.copyAmount(4L, new Object[]{aStack}), GT_ModHandler.getIC2Item("windMill", 1L), 6400, 8); - case "plateAlloyAdvanced": - GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.glass, 3, 32767), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), 400, 4, false); - GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 3L), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), 400, 4, false); - case "plateAlloyIridium": - GT_ModHandler.removeRecipeByOutput(aStack); - case "plateIron": case "plateCopper": case "plateTin": case "plateBronze": case "plateGold": case "plateSteel ": case "plateLead": case "plateAluminium": case "plateStainlessSteel": case "plateTitanium": case "plateTungsten": case "plateTungstenSteel": case "plateIridium": case "plateChrome": case "plateOsmium": case "plateNeutronium": - GT_ModHandler.removeRecipeByOutput(aStack); - } + registerPlateAlloy(aOreDictName, aStack); + break; + default: break; - default: - break; } } + + private void registerPlate(final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing) { + + registerCover(aMaterial, aStack); + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + GT_ModHandler.removeRecipeDelayed(aStack); + + GT_Utility.removeSimpleIC2MachineRecipe( + GT_Utility.copyAmount(9L, aStack), + GT_ModHandler.getCompressorRecipeList(), + GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)); + + if (aMaterial.mFuelPower > 0) { + + RA.addFuel( + GT_Utility.copyAmount(1L, aStack), + NI, + aMaterial.mFuelPower, + aMaterial.mFuelType); + + } + + if (aMaterial.mStandardMoltenFluid != null && + !(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { + + RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Plate.get(0L), + aMaterial.getMolten(L), + aMaterial.getPlates(1), + 32, 8); + + } + + 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)}); + + 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)}); + } + + if (aMaterial.mUnificatable && aMaterial.mMaterialInto == aMaterial) { + + if (!aNoSmashing && + GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { + + GT_ModHandler.addCraftingRecipe( + aMaterial.getPlates(1), + tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE + new Object[]{ + "h", // craftingToolHardHammer + "X", + "X", + 'X', OrePrefixes.ingot.get(aMaterial)}); + + // 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)}); + + 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)}); + + // 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)}); + + } + + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && + (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) { + + GT_ModHandler.addCraftingRecipe( + aMaterial.getDust(1), + tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE + new Object[]{ + "X", + "m", + 'X', OrePrefixes.plate.get(aMaterial)}); + + } + } + } + + private void registerPlateDouble(final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass) { + + registerCover(aMaterial, aStack); + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + if (!aNoSmashing) { + + RA.addBenderRecipe( + GT_Utility.copyAmount(2L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 96); + + if (GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Tools.hammerdoubleplate, + OrePrefixes.plate.get(aMaterial).toString(), true)) { + + Object aPlateStack = OrePrefixes.plate.get(aMaterial); + + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + "I", + "B", + "h", // craftingToolHardHammer + 'I', aPlateStack, + 'B', aPlateStack}); + + // Only added if IC2 Forge Hammer is enabled in Recipes.cfg: B:ic2forgehammer_true=false + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + aPlateStack, + aPlateStack}); + + } + + RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), + GT_Utility.copyAmount(1L, aStack), + (int) Math.max(aMaterialMass * 2L, 1L), + 96); + + } else { + + RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), + gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + Materials.Glue.getFluid(10L), + GT_Utility.copyAmount(1L, aStack), + 64, 8); + + } + } + + private void registerPlateTriple(final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass) { + + registerCover(aMaterial, aStack); + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + if (!aNoSmashing) { + + RA.addBenderRecipe( + GT_Utility.copyAmount(3L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), + (int) Math.max(aMaterialMass * 3L, 1L), + 96); + + if (GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Tools.hammertripleplate, + OrePrefixes.plate.get(aMaterial).toString(), true)) { + + Object aPlateStack = OrePrefixes.plate.get(aMaterial); + + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + "I", + "B", + "h", // craftingToolHardHammer + 'I', OrePrefixes.plateDouble.get(aMaterial), + 'B', aPlateStack}); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + aPlateStack, aPlateStack, aPlateStack}); + + } + + RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 3L), + GT_Utility.copyAmount(1L, aStack), + (int) Math.max(aMaterialMass * 3L, 1L), + 96); + + } else { + + RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 3L), + gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 3L), + Materials.Glue.getFluid(20L), + GT_Utility.copyAmount(1L, aStack), + 96, 8); + + } + + RA.addImplosionRecipe( + GT_Utility.copyAmount(1L, aStack), + 2, + GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + + } + + private void registerPlateQuadruple(final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass, + final boolean aNoWorking) { + + 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 (!aNoSmashing) { + + if (GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Tools.hammerquadrupleplate, + OrePrefixes.plate.get(aMaterial).toString(), true)) { + + Object aPlateStack = OrePrefixes.plate.get(aMaterial); + + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + "I", + "B", + "h", // craftingToolHardHammer + 'I', OrePrefixes.plateTriple.get(aMaterial), + 'B', aPlateStack}); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + aPlateStack, aPlateStack, aPlateStack, aPlateStack}); + + } + + RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), + GT_Utility.copyAmount(1L, aStack), + (int) Math.max(aMaterialMass * 4L, 1L), + 96); + + } else { + + RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), + gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + Materials.Glue.getFluid(30L), GT_Utility.copyAmount(1L, aStack), + 128, 8); + + } + } + + private void registerPlateQuintuple(final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass) { + + registerCover(aMaterial, aStack); + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + if (!aNoSmashing) { + + if (GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Tools.hammerquintupleplate, + OrePrefixes.plate.get(aMaterial).toString(), true)) { + + Object aPlateStack = OrePrefixes.plate.get(aMaterial); + + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + "I", + "B", + "h", // craftingToolHardHammer + 'I', OrePrefixes.plateQuadruple.get(aMaterial), + 'B', aPlateStack}); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, + new Object[]{ + ToolDictNames.craftingToolForgeHammer, + aPlateStack, aPlateStack, aPlateStack, aPlateStack, aPlateStack}); + + } + + RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 5L), + GT_Utility.copyAmount(1L, aStack), + (int) Math.max(aMaterialMass * 5L, 1L), + 96); + + } else { + + RA.addAssemblerRecipe( + gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 5L), + ItemList.Circuit_Integrated.getWithDamage(0L, 5L), + Materials.Glue.getFluid(40L), + GT_Utility.copyAmount(1L, aStack), + 160, 8); + + } + } + + private void registerPlateDense(final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass) { + + registerCover(aMaterial, aStack); + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + if (!aNoSmashing) { + + RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), + GT_Utility.copyAmount(1L, aStack), (int) Math.max(aMaterialMass * 9L, 1L), + 96); + + } + + } + + private void registerItemCasing(final OrePrefixes aPrefix, + final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing) { + + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + if (aMaterial.mStandardMoltenFluid != null) { + + RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + aMaterial.getMolten(L / 2), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), + 16, 8); + + } + + if (aMaterial.mUnificatable && + aMaterial.mMaterialInto == aMaterial && + !aNoSmashing && + GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { + + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), + tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE + new Object[]{ + "h X", + 'X', OrePrefixes.plate.get(aMaterial)}); + + // 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)}); + + } + + RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 2L), + ItemList.Shape_Mold_Casing.get(0L), GT_Utility.copyAmount(3L, aStack), 128, 15); + + RA.addCutterRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 2L), + NI, + (int) Math.max(aMaterial.getMass(), 1L), + 16); + + RA.addExtruderRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + ItemList.Shape_Extruder_Casing.get(0L), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 2L), + (int) Math.max(aMaterial.getMass(), 1L), + 45); + + GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); + + } + + private void registerPlateAlloy(final String aOreDictName, + final ItemStack aStack) { + + switch (aOreDictName) { + + case "plateAlloyCarbon": + + RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("generator", 1L), + GT_Utility.copyAmount(4L, aStack), + GT_ModHandler.getIC2Item("windMill", 1L), + 6400, 8); + + break; + + case "plateAlloyAdvanced": + + GT_ModHandler.addAlloySmelterRecipe( + GT_Utility.copyAmount(1L, aStack), + new ItemStack(Blocks.glass, 3, W), + GT_ModHandler.getIC2Item("reinforcedGlass", 4L), + 400, 4, false); + + GT_ModHandler.addAlloySmelterRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Glass.getDust(3), + GT_ModHandler.getIC2Item("reinforcedGlass", 4L), + 400, 4, false); + + break; + + case "plateAlloyIridium": + + // Remove IC2 Shaped recipe for Iridium Reinforced Plate + GT_ModHandler.removeRecipeByOutputDelayed(aStack); + + break; + + default: + break; + + } + + } + + private void registerCover(final Materials aMaterial, final ItemStack aStack) { + + // 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}) { + if ((tStack = GT_OreDictUnificator.get(orePrefix, aMaterial, 1)) != NI) break; + } + + // Register the cover + 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() : + // or copy Block texture + TextureFactory.of(Block.getBlockFromItem(tStack.getItem()), tStack.getItemDamage()), + null); + + } + } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java index dbc15df0e8..14b6bf8eb7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java @@ -15,8 +15,9 @@ public class ProcessingPure implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.reduced.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), 10, 16); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java index 503f73080a..83cf284eb6 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java @@ -15,6 +15,7 @@ public class ProcessingRecycling implements gregtech.api.interfaces.IOreRecipeRe tPrefix.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((aMaterial != Materials.Empty) && (GT_Utility.getFluidForFilledItem(aStack, true) == null) && !aMaterial.contains(SubTag.SMELTING_TO_FLUID)) GT_Values.RA.addCannerRecipe(aStack, null, GT_Utility.getContainerItem(aStack, true), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aPrefix.mMaterialAmount / 3628800L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 2); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java index bbf31ec643..fdd9ccc5a9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java @@ -11,15 +11,16 @@ public class ProcessingRotor implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.rotor.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('R'), OrePrefixes.ring.get(aMaterial), Character.valueOf('S'), OrePrefixes.screw.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'R', OrePrefixes.ring.get(aMaterial), 'S', OrePrefixes.screw.get(aMaterial)}); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.Tin.getMolten(32), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.Lead.getMolten(48), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), Materials.SolderingAlloy.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); - GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 5L), ItemList.Shape_Extruder_Rotor.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 200, 60); + GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 5L), ItemList.Shape_Extruder_Rotor.get(0L), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 200, 60); if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rotor.get(0L, new Object[0]), aMaterial.getMolten(612L), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 100, 60); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rotor.get(0L), aMaterial.getMolten(612L), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 100, 60); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java index 20429bc4ce..dde16fbda6 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java @@ -20,10 +20,10 @@ public class ProcessingRound implements gregtech.api.interfaces.IOreRecipeRegist @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[]{aStack}), null, (int) Math.max(aMaterial.getMass() / 4L, 1L), 8); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, (int) Math.max(aMaterial.getMass() / 4L, 1L), 8); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "Xh", Character.valueOf('X'), OrePrefixes.nugget.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"fXh", Character.valueOf('X'), OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "Xh", 'X', OrePrefixes.nugget.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"fXh", 'X', OrePrefixes.ingot.get(aMaterial)}); } } if (GT_Mod.gregtechproxy.mAE2Integration) { diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java index 8e2806e756..ddd558c487 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java @@ -13,11 +13,12 @@ public class ProcessingSand implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.sand.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals("sandCracked")) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), -1, gregtech.api.util.GT_ModHandler.getFuelCan(25000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8L), null, null, null, new ItemStack(Blocks.sand, 10), 2500); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(16L, aStack), -1, gregtech.api.util.GT_ModHandler.getFuelCan(25000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8L), null, null, null, new ItemStack(Blocks.sand, 10), 2500); } else if (aOreDictName.equals("sandOil")) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), 1, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), new ItemStack(Blocks.sand, 1, 0), null, null, null, null, 1000); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, aStack), 1, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), new ItemStack(Blocks.sand, 1, 0), null, null, null, null, 1000); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java index bdc60b0b54..33ac22c7ac 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java @@ -14,9 +14,10 @@ public class ProcessingSaplings implements gregtech.api.interfaces.IOreRecipeReg OrePrefixes.treeSapling.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addPulveriserRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)}, new int[]{10000}, 100, 2); - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.IC2_Plantball.get(1L, new Object[0])); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8); + GT_Values.RA.addPulveriserRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)}, new int[]{10000}, 100, 2); + GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L)); + GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java index a083c7e468..ca93c8bb06 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java @@ -18,9 +18,9 @@ public class ProcessingScrew implements gregtech.api.interfaces.IOreRecipeRegist @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[]{aStack}), null, (int) Math.max(aMaterial.getMass() / 8L, 1L), 4); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, (int) Math.max(aMaterial.getMass() / 8L, 1L), 4); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "X ", Character.valueOf('X'), OrePrefixes.bolt.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', OrePrefixes.bolt.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java index 39f7ca51e5..563185677a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java @@ -15,6 +15,7 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi OrePrefixes.dust.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (((aMaterial == Materials.Glass) || (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null)) && (!aMaterial.contains(SubTag.NO_SMELTING))) { long aMaterialMass = aMaterial.getMass(); @@ -29,117 +30,117 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi } if (!OrePrefixes.block.isIgnored(aMaterial.mSmeltInto)) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), ItemList.Shape_Extruder_Block.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 10 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), ItemList.Shape_Mold_Block.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 5 * tAmount, 4 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Shape_Extruder_Block.get(0L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 10 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Shape_Mold_Block.get(0L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 5 * tAmount, 4 * tVoltageMultiplier); } if (((aPrefix != OrePrefixes.ingot) || (aMaterial != aMaterial.mSmeltInto))) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, tAmount), 10, 4 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Ingot.get(0L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, tAmount), 10, 4 * tVoltageMultiplier); } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Pipe_Tiny.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial.mSmeltInto, tAmount * 2), 4 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Pipe_Tiny.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial.mSmeltInto, tAmount * 2), 4 * tAmount, 8 * tVoltageMultiplier); if (!(aMaterial == Materials.Redstone || aMaterial == Materials.Glowstone)) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Pipe_Small.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial.mSmeltInto, tAmount), 8 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Pipe_Medium.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial.mSmeltInto, tAmount), 24 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), ItemList.Shape_Extruder_Pipe_Large.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial.mSmeltInto, tAmount), 48 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Pipe_Small.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial.mSmeltInto, tAmount), 8 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Shape_Extruder_Pipe_Medium.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial.mSmeltInto, tAmount), 24 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Shape_Extruder_Pipe_Large.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial.mSmeltInto, tAmount), 48 * tAmount, 8 * tVoltageMultiplier); } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(12L, new Object[]{aStack}), ItemList.Shape_Extruder_Pipe_Huge.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial.mSmeltInto, tAmount), 96 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Extruder_Small_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), ItemList.Shape_Extruder_Turbine_Blade.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(12L, aStack), ItemList.Shape_Extruder_Pipe_Huge.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial.mSmeltInto, tAmount), 96 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Plate.get(0L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Extruder_Small_Gear.get(0L), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Shape_Extruder_Turbine_Blade.get(0L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ring.get(0L, new Object[0]), aMaterial.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), 100, 4 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Screw.get(0L, new Object[0]), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod.get(0L, new Object[0]), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), 150, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Bolt.get(0L, new Object[0]), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Round.get(0L, new Object[0]), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod_Long.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), 300, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Turbine_Blade.get(0L, new Object[0]), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), 400, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Tiny.get(0L, new Object[0]), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 1L), 20, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Small.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 1L), 40, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Medium.get(0L, new Object[0]), aMaterial.getMolten(432L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1L), 80, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Large.get(0L, new Object[0]), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), 160, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Huge.get(0L, new Object[0]), aMaterial.getMolten(1728L), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), 320, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ring.get(0L), aMaterial.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), 100, 4 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Screw.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), 50, 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod.get(0L), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), 150, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Bolt.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), 50, 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Round.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), 50, 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod_Long.get(0L), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), 300, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Turbine_Blade.get(0L), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), 400, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Tiny.get(0L), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 1L), 20, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Small.get(0L), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 1L), 40, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Medium.get(0L), aMaterial.getMolten(432L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1L), 80, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Large.get(0L), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), 160, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Huge.get(0L), aMaterial.getMolten(1728L), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), 320, 8 * tVoltageMultiplier); } if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Rod.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Rod.get(0L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Wire.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Wire.get(0L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); if (tAmount * 8 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Bolt.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial.mSmeltInto, tAmount * 8), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Bolt.get(0L), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial.mSmeltInto, tAmount * 8), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); if (tAmount * 4 <= 64) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Ring.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial.mSmeltInto, tAmount * 4), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Ring.get(0L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial.mSmeltInto, tAmount * 4), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_SMASHING)) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', OrePrefixes.stick.get(aMaterial)}); } - //GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Sword.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); - //GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Pickaxe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); - //GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Shovel.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - //GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Axe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); - //GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Hoe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Sword.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Pickaxe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Shovel.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Axe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Hoe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), ItemList.Shape_Extruder_Hammer.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 6L * tAmount, tAmount), 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_File.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Saw.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Shape_Extruder_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 5L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 2 * tVoltageMultiplier); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Shape_Mold_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 10L * tAmount, tAmount), 2 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Plate.get(0L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 2 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Shape_Mold_Gear.get(0L), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 10L * tAmount, tAmount), 2 * tVoltageMultiplier); switch (aMaterial.mSmeltInto.mName) { case "Glass": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Bottle.get(0L, new Object[0]), new ItemStack(Items.glass_bottle, 1), tAmount * 32, 16); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Mold_Bottle.get(0L, new Object[0]), new ItemStack(Items.glass_bottle, 1), tAmount * 64, 4); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Bottle.get(0L), new ItemStack(Items.glass_bottle, 1), tAmount * 32, 16); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Mold_Bottle.get(0L), new ItemStack(Items.glass_bottle, 1), tAmount * 64, 4); break; case "Steel": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.Cell_Empty.get(tAmount, new Object[0]), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount), tAmount * 128, 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingadviron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingadviron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingadviron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingadviron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Iron": case "WroughtIron": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), GT_ModHandler.getIC2Item("fuelRod", tAmount), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), GT_ModHandler.getIC2Item("fuelRod", tAmount), tAmount * 128, 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingiron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingiron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingiron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingiron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); if (tAmount * 31 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(31L, new Object[]{aStack}), ItemList.Shape_Mold_Anvil.get(0L, new Object[0]), new ItemStack(Blocks.anvil, 1, 0), tAmount * 512, 4 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(31L, aStack), ItemList.Shape_Mold_Anvil.get(0L), new ItemStack(Blocks.anvil, 1, 0), tAmount * 512, 4 * tVoltageMultiplier); break; case "Tin": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.Cell_Empty.get(tAmount, new Object[0]), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount), tAmount * 128, 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingtin", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingtin", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Lead": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casinglead", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casinglead", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Copper": case "AnnealedCopper": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingcopper", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingcopper", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Bronze": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingbronze", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingbronze", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Gold": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinggold", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casinggold", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinggold", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casinggold", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); break; case "Polytetrafluoroethylene": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.Cell_Empty.get(tAmount, new Object[0]), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount * 4), tAmount * 128, 30); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java index 8fcfdc984d..13be24a948 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java @@ -12,9 +12,10 @@ public class ProcessingSlab implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.slab.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.startsWith("slabWood")) { - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), Materials.Creosote.getFluid(1000L), ItemList.RC_Tie_Wood.get(1L, new Object[0]), null, null, null, 200, 4); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(3L, aStack), Materials.Creosote.getFluid(1000L), ItemList.RC_Tie_Wood.get(1L), null, null, null, 200, 4); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java index ac17b4a168..7be7595fd9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java @@ -12,20 +12,21 @@ public class ProcessingStick implements gregtech.api.interfaces.IOreRecipeRegist OrePrefixes.stick.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 1L), new Object[]{" s ", "fPx", 'P', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" s ", "fPx", 'P', OrePrefixes.stick.get(aMaterial)}); if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_WORKING)) { GT_Values.RA.addLatheRecipe(aMaterial.contains(SubTag.CRYSTAL) ? GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial.mMacerateInto, 2L), (int) Math.max(aMaterial.getMass() * 5L, 1L), 16); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L), null, (int) Math.max(aMaterial.getMass() * 2L, 1L), 4); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L), null, (int) Math.max(aMaterial.getMass() * 2L, 1L), 4); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"s", "X", Character.valueOf('X'), OrePrefixes.stickLong.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"f ", " X", Character.valueOf('X'), OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"s", "X", 'X', OrePrefixes.stickLong.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', OrePrefixes.ingot.get(aMaterial)}); } } if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), 16); + GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); + GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), 16); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L, new Object[0]), 16, 8); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L), 16, 8); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java index 804b68d6b3..8a0e573d75 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java @@ -15,19 +15,20 @@ public class ProcessingStickLong implements gregtech.api.interfaces.IOreRecipeRe OrePrefixes.stickLong.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), new Object[]{" s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial)}); if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), null, (int) Math.max(aMaterial.getMass(), 1L), 4); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), null, (int) Math.max(aMaterial.getMass(), 1L), 4); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"sf", "G ", Character.valueOf('G'), OrePrefixes.gemFlawless.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"sf", "G ", Character.valueOf('G'), OrePrefixes.gemExquisite.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"sf", "G ", 'G', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"sf", "G ", 'G', OrePrefixes.gemExquisite.get(aMaterial)}); } } if (!aMaterial.contains(SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), 200, 16); + GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), 200, 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"ShS", Character.valueOf('S'), OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"ShS", 'S', OrePrefixes.stick.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java index 4a79beb44f..69ee30e544 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java @@ -19,82 +19,79 @@ public class ProcessingStone OrePrefixes.stone.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { Block aBlock = GT_Utility.getBlockFromStack(aStack); switch (aMaterial.mName) { case "NULL": - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), new ItemStack(Blocks.redstone_torch, 2), Materials.Redstone.getMolten(144L), new ItemStack(Items.repeater, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, aStack), new ItemStack(Blocks.redstone_torch, 2), Materials.Redstone.getMolten(144L), new ItemStack(Items.repeater, 1), 100, 4); break; case "Sand": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.sand, 1, 0), null, 10, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.sand, 1, 0), null, 10, false); break; case "Endstone": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungstate, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungstate, 1L), 5, false); break; case "Netherrack": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5, false); break; case "NetherBrick": - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.nether_brick_fence, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.nether_brick_fence, 1), 100, 4); break; case "Obsidian": if (aBlock != Blocks.air) aBlock.setResistance(20.0F); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 2L), GT_Utility.copyAmount(5L, new Object[]{aStack}), Materials.Glass.getMolten(72L), GT_ModHandler.getModItem("Forestry", "thermionicTubes", 4L, 6), 64, 30); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1L), GT_Utility.copyAmount(3L, new Object[]{aStack}), Materials.Glass.getMolten(720L), new ItemStack(Blocks.beacon, 1, 0), 32, 16); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4); - //GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1L), new ItemStack(Blocks.ender_chest, 1), 400, 4); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true); - //GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Compressed_Coal_Ball.get(8L), ItemList.IC2_Compressed_Coal_Chunk.get(1L), 400, 4); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true); break; case "Concrete": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 100, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 100, 30); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); break; case "Rhyolite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartz, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartz, 1L), 20, false); break; case "Komatiite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Biotite, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Biotite, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 5, false); break; case "Dacite": case "Andesite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), 20, false); break; case "Gabbro": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrite, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrite, 1L), 20, false); break; case "Eclogite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 1L), 10, false); break; case "Soapstone": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Talc, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chromite, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Talc, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chromite, 1L), 10, false); break; case "Greenschist": case "Blueschist": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Glauconite, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), 100, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Glauconite, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), 100, false); break; case "Gneiss": case "Migmatite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.GraniteBlack, 1L), 50, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.GraniteBlack, 1L), 50, false); break; case "Redrock": case "Marble": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); case "Basalt": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); case "Quartzite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, false); break; case "Flint": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false); break; case "GraniteBlack": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), 1, false); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), 1, false); break; case "GraniteRed": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), 1, false); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), 1, false); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java index f97b361a75..80c199e64f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java @@ -15,10 +15,11 @@ public class ProcessingStoneCobble implements gregtech.api.interfaces.IOreRecipe OrePrefixes.stoneCobble.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.lever, 1), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), new ItemStack(Blocks.furnace, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.dropper, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, new Object[]{aStack}), new ItemStack(Items.bow, 1, 0), Materials.Redstone.getMolten(144L), new ItemStack(Blocks.dispenser, 1), 400, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.lever, 1), 400, 1); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), new ItemStack(Blocks.furnace, 1), 400, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.dropper, 1), 400, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, aStack), new ItemStack(Items.bow, 1, 0), Materials.Redstone.getMolten(144L), new ItemStack(Blocks.dispenser, 1), 400, 4); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java index f3f1fe1f2e..4d51de6b43 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java @@ -19,10 +19,11 @@ public class ProcessingStoneVarious implements gregtech.api.interfaces.IOreRecip OrePrefixes.stoneSmooth.add(this); } + @Override 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, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.stone_button, 1), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), new ItemStack(Blocks.stone_pressure_plate, 1), 200, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.stone_button, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), new ItemStack(Blocks.stone_pressure_plate, 1), 200, 4); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java index 55d9906e55..5ca31635fe 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java @@ -38,7 +38,7 @@ public class ProcessingToolHead implements gregtech.api.interfaces.IOreRecipeReg case toolHeadArrow: if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Arrow.get(0L, new Object[0]), aMaterial.getMolten(36L), GT_Utility.copyAmount(1L, new Object[]{aStack}), 16, 4); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Arrow.get(0L), aMaterial.getMolten(36L), GT_Utility.copyAmount(1L, aStack), 16, 4); } if (aSpecialRecipeReq2) { GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"Xf", 'X', OrePrefixes.gemChipped.get(aMaterial)}); @@ -46,118 +46,141 @@ public class ProcessingToolHead implements gregtech.api.interfaces.IOreRecipeReg } 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_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PIh", "P ", "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG ", "G ", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadBuzzSaw: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Titanium , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.TungstenSteel , 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.Titanium , new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.Titanium , new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.Titanium , new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium , 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel , 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.Titanium , new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), '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.Titanium , new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), '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.Titanium , new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'R', OrePrefixes.spring.get(Materials.Titanium), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"XSX", "XSX", "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel)}); break; case toolHeadFile: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial, 1L), GT_Utility.getIntegratedCircuit(15)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if ((!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.BOUNCY))) { GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P", "P", "S", 'P', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); } break; case toolHeadHoe: - //GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - //if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PIh", "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - //if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG ", "f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(16)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); + if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PIh", "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG ", "f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadPickaxe: - //GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), 100, 480); - //if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PII", "f h", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - //if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGG", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); + if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PII", "f h", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGG", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadPlow: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Utility.getIntegratedCircuit(6)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PP", "PP", "hf", 'P', OrePrefixes.plate.get(aMaterial)}); if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG", "GG", " f", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSaw: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Utility.getIntegratedCircuit(7)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PP ", "fh ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGf", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSense: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Utility.getIntegratedCircuit(8)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PPI", "hf ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGG", " f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadShovel: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Utility.getIntegratedCircuit(9)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fG", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSword: - //GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - //if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" P ", "fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - //if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" G", "fG", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); + if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" P ", "fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" G", "fG", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadUniversalSpade: GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial), OrePrefixes.screw.get(aMaterial), ToolDictNames.craftingToolScrewdriver}); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", 'X', OrePrefixes.toolHeadShovel.get(aMaterial)}); break; case toolHeadWrench: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.StainlessSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Titanium, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.Titanium ), 'P', OrePrefixes.plate.get(Materials.Titanium ), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium ), 'B', ItemList.Battery_RE_MV_Sodium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.TungstenSteel, 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, new Object[0]), 'S', OrePrefixes.screw.get(Materials.TungstenSteel ), 'P', OrePrefixes.plate.get(Materials.TungstenSteel ), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel ), 'B', ItemList.Battery_RE_HV_Sodium.get(1L, new Object[0])}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. WRENCH_LV, 1, aMaterial, Materials.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), '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) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? + GT_MetaGenerated_Tool_01.SOFTMALLET : + GT_MetaGenerated_Tool_01.HARDHAMMER, + 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, 120 + ); if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats((aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? GT_MetaGenerated_Tool_01.SOFTMALLET : GT_MetaGenerated_Tool_01.HARDHAMMER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats((aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? GT_MetaGenerated_Tool_01.SOFTMALLET : GT_MetaGenerated_Tool_01.HARDHAMMER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', aMaterial == Materials.Wood ? OrePrefixes.plank.get(Materials.Wood) : OrePrefixes.ingot.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java index f13a6b56b8..5a85ecc86e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java @@ -26,12 +26,10 @@ public class ProcessingToolOther implements gregtech.api.interfaces.IOreRecipeRe GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BRANCHCUTTER, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "PdP", "STS", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial), 'T', OrePrefixes.screw.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.KNIFE, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"fPh", " S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPf", "PP ", "Sh ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, aMaterial, Materials.Rubber, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Iron), 'L', ItemList.Battery_RE_LV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_MV, 1, aMaterial, Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Steel), 'L', ItemList.Battery_RE_MV_Lithium.get(1L, new Object[0])}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_HV, 1, aMaterial, Materials.StyreneButadieneRubber, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.StyreneButadieneRubber), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'L', ItemList.Battery_RE_HV_Lithium.get(1L, new Object[0])}); - //GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_EV, 1, aMaterial, Materials.StyreneButadieneRubber, new long[]{10000000L, 2048L, 4L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.StyreneButadieneRubber), 'S', OrePrefixes.stick.get(Materials.Titanium), 'L', ItemList.IC2_LapotronCrystal.get(1L, new Object[0])}); - //GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_IV, 1, aMaterial, Materials.Silicone, new long[]{100000000L, 8192L, 5L, -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.Silicone), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'L', ItemList.Energy_LapotronicOrb.get(1L, new Object[0])}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, aMaterial, Materials.Rubber, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Iron), 'L', ItemList.Battery_RE_LV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_MV, 1, aMaterial, Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Steel), 'L', ItemList.Battery_RE_MV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_HV, 1, aMaterial, Materials.StyreneButadieneRubber, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.StyreneButadieneRubber), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'L', ItemList.Battery_RE_HV_Lithium.get(1L)}); } } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java index 7ea9ce744d..3cfd0d6fa5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java @@ -8,38 +8,38 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; -public class ProcessingTransforming - implements IOreRecipeRegistrator { +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); } + @Override 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, new Object[]{aStack}), Materials.SeedOil.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SeedOilLin.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SeedOilHemp.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOil.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOilLin.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOilHemp.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); break; case "Iron": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); break; case "WroughtIron": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); break; case "Steel": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); break; case "Neodymium": - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 256); + GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 256); case "Samarium": - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 4096); + GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 4096); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java index ce3f59ff40..15e287b281 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java @@ -11,8 +11,9 @@ public class ProcessingWax implements gregtech.api.interfaces.IOreRecipeRegistra OrePrefixes.wax.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals("waxMagical")) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, 6, 5); + 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 1951c37382..2c244c10f3 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java @@ -30,6 +30,7 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.wireGt16.add(this); } + @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (GT_Mod.gregtechproxy.mAE2Integration) { if (tt == TunnelType.ME) { @@ -48,51 +49,51 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr cableWidth = 1; correspondingCable = OrePrefixes.cableGt01; if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); - GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L), 200, 8); + GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); + GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L), 200, 8); //GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copy(new Object[]{GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 8L)}), 100, 4); //GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Utility.copy(new Object[]{aStack, GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L)}), 50, 4); } if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"Xx", Character.valueOf('X'), OrePrefixes.plate.get(aMaterial)}); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), 150, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), 200, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt08, aMaterial, 1L), 300, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(12L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 12L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt12, aMaterial, 1L), 400, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 16L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt16, aMaterial, 1L), 500, 8); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"Xx", 'X', OrePrefixes.plate.get(aMaterial)}); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), 150, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), 200, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt08, aMaterial, 1L), 300, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(12L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 12L), GT_OreDictUnificator.get(OrePrefixes.wireGt12, aMaterial, 1L), 400, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(16L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 16L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, aMaterial, 1L), 500, 8); break; case wireGt02: cableWidth = 2; correspondingCable = OrePrefixes.cableGt02; GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); break; case wireGt04: cableWidth = 4; correspondingCable = OrePrefixes.cableGt04; GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 4L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial)}); break; case wireGt08: cableWidth = 8; correspondingCable = OrePrefixes.cableGt08; GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 8L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial),OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial),OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); break; case wireGt12: cableWidth = 12; correspondingCable = OrePrefixes.cableGt12; GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 12L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); break; case wireGt16: cableWidth = 16; correspondingCable = OrePrefixes.cableGt16; GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 16L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); if (GT_Mod.gregtechproxy.mAE2Integration) { AE2addNewAttunement(aStack); @@ -108,13 +109,13 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr switch (aMaterial.mName){ case "RedAlloy":case "Cobalt": case "Lead": case "Tin": case "Zinc":case "SolderingAlloy": - ArrayList<Object> craftingListRubber = new ArrayList<Object>(); + ArrayList<Object> craftingListRubber = new ArrayList<>(); craftingListRubber.add(aOreDictName); for (int i = 0; i < costMultiplier; i++) { craftingListRubber.add(OrePrefixes.plate.get(Materials.Rubber)); } GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), craftingListRubber.toArray()); - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate.get(Materials.Rubber), costMultiplier), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate.get(Materials.Rubber), costMultiplier), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), 100, 8); GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt02, aMaterial, 1L), 200, 16); GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 4L), GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt04, aMaterial, 1L), 300, 30); @@ -129,6 +130,8 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); } @@ -142,7 +145,9 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); } } @@ -183,7 +188,7 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr } break; } - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[]{aStack}), null, 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, 100, 8); if (GT_Mod.gregtechproxy.mAE2Integration) { AE2AddNetAttunementCable(aStack, correspondingCable, aMaterial); } @@ -211,4 +216,4 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L),(TunnelType) tt); } //end region -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java b/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java index 2f0bf8648f..26a1313694 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java @@ -9,8 +9,8 @@ import net.minecraft.item.ItemPickaxe; import java.util.Set; -public class GT_BlockResistanceLoader - implements Runnable { +public class GT_BlockResistanceLoader implements Runnable { + @Override public void run() { if (GT_Mod.gregtechproxy.mHardRock) { Blocks.stone.setHardness(16.0F); diff --git a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java index c25b890003..6a5e81ebc0 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java @@ -11,8 +11,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; -public class GT_BookAndLootLoader - implements Runnable { +public class GT_BookAndLootLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding worldgenerated Chest Content."); if (GT_Mod.gregtechproxy.mIncreaseDungeonLoot) { @@ -47,11 +47,11 @@ public class GT_BookAndLootLoader tChest.setMax(tChest.getMax() + 16); tChest.setMin(tChest.getMin() + 8); } - ChestGenHooks.addItem("bonusChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L, new Object[0]), 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, new Object[0]), 4, 8, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L, new Object[0]), 8, 16, 80)); + ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 20)); + ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 80)); ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 1, 6, 120)); ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), 1, 6, 30)); ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 1, 6, 60)); @@ -68,7 +68,7 @@ public class GT_BookAndLootLoader ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 1, 6, 40)); ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 3, 40)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L, new Object[0]), 4, 8, 2)); + ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 2)); ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 4, 16, 12)); ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Platinum, 1L), 2, 8, 4)); ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); @@ -78,8 +78,8 @@ public class GT_BookAndLootLoader ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 2, 8, 4)); ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.Coin_Gold_Ancient.get(1L, new Object[0]), 16, 64, 10)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.ZPM.getWithCharge(1L, 2147483647, new Object[0]), 1, 1, 1)); + ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.Coin_Gold_Ancient.get(1L), 16, 64, 10)); + ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.ZPM.getWithCharge(1L, 2147483647), 1, 1, 1)); ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 4, 16, 12)); ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 2, 8, 2)); @@ -106,7 +106,7 @@ public class GT_BookAndLootLoader ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.DamascusSteel, 1L), 1, 4, 1)); ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.DamascusSteel, 1L), 1, 4, 1)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L, new Object[0]), 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)); ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 2, 8, 6)); ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Manganese, 1L), 2, 8, 12)); @@ -115,8 +115,8 @@ public class GT_BookAndLootLoader ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Brass, 1L), 4, 12, 12)); ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), 4, 12, 1)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L, new Object[0]), 4, 8, 6)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L, new Object[0]), 1, 1, 10)); + ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 6)); + ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L), 1, 1, 10)); ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.DamascusSteel, 1L), 4, 8, 6)); ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Steel, 1L), 8, 16, 12)); diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 4ecbafae9c..55e41939bb 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -3,7 +3,14 @@ package gregtech.loaders.postload; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Dyes; +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.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; @@ -15,663 +22,542 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -public class GT_CraftingRecipeLoader implements Runnable { - private final static String aTextIron1 = "X X"; - private final static String aTextIron2 = "XXX"; - private final static String aTextRailcraft = "Railcraft"; - private final static String aTextMachineBeta = "machine.beta"; - private final static String aTextMachineAlpha = "machine.alpha"; - private final static long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; - private final static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | bits; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +public class GT_CraftingRecipeLoader implements Runnable { + private static final String aTextIron1 = "X X"; + private static final String aTextIron2 = "XXX"; + private static final String aTextRailcraft = "Railcraft"; + private static final String aTextMachineBeta = "machine.beta"; + private static final String aTextMachineAlpha = "machine.alpha"; + private static final long bits_no_remove_buffered = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED; + private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + private static final long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | bits; + + @Override public void run() { GT_Log.out.println("GT_Mod: Adding nerfed Vanilla Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"XhX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"XhX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron)}); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Bucket", true)) { - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextIron1, " X ", 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), bits_no_remove_buffered, new Object[]{aTextIron1, " X ", 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); } ItemStack tMat = new ItemStack(Items.iron_ingot); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.PressurePlate", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, null, null, null, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Door", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, tMat, tMat, null, tMat, tMat, null))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"XX ", "XXh", "XX ", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"XX ", "XXh", "XX ", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Cauldron", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, null, tMat, tMat, null, tMat, tMat, tMat, tMat))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron1, "XhX", aTextIron2, 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron1, "XhX", aTextIron2, 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Hopper", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, null, tMat, tMat, new ItemStack(Blocks.chest, 1, 0), tMat, null, tMat, null))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.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"}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"XwX", "XCX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron), 'C', "craftingChest"}); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Bars", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, tMat, tMat, tMat, tMat, null, null, null))) { tStack.stackSize /= 2; - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{" w ", aTextIron2, aTextIron2, 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{" w ", aTextIron2, aTextIron2, 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); } } - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironFence", 6L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextIron2, aTextIron2, " w ", 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironFence", 6L), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextIron2, aTextIron2, " w ", 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); tMat = new ItemStack(Items.gold_ingot); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Gold.PressurePlate", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, null, null, null, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.Gold), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.Gold), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); } } tMat = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Rubber.Sheet", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, tMat, tMat, tMat, tMat, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron2, aTextIron2, 'X', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron2, aTextIron2, 'X', OrePrefixes.plate.get(Materials.Rubber)}); } } - GT_ModHandler.removeRecipeByOutput(ItemList.Bottle_Empty.get(1L)); - GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Spray_WeedEx.get(1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reBattery", 1L)); - GT_ModHandler.removeRecipeByOutput(new ItemStack(Blocks.tnt)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("dynamite", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("industrialTnt", 1L)); - - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 0), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 1), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 2), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 3), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 4), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 5), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 6), true, false, true); - - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "engine", 1L, 0), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "engine", 1L, 1), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "engine", 1L, 2), true, false, true); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Forestry", "engine", 1L, 4), true, false, true); + GT_ModHandler.removeRecipeByOutputDelayed(ItemList.Bottle_Empty.get(1L)); + GT_ModHandler.removeRecipeByOutputDelayed(ItemList.IC2_Spray_WeedEx.get(1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("reBattery", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Blocks.tnt)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("dynamite", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("industrialTnt", 1L)); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 0)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 1)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 2)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 3)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 4)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 5)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "stamps", 1L, 6)); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "engine", 1L, 0)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "engine", 1L, 1)); + 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)); if (tStack != null) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"s", "P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize / 2 : tStack.stackSize, tStack), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), bits_no_remove_buffered, new Object[]{"s", "P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize / 2 : tStack.stackSize, tStack), bits_no_remove_buffered, new Object[]{"P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); } - //GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.wooden_pressure_plate, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PP", 'P', new ItemStack(Blocks.wooden_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stone_button, 2, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"S", "S", 'S', OrePrefixes.stone}); - //GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stone_pressure_plate, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SS", 'S', OrePrefixes.stone}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.stone_button, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stone_button, 2, 0), bits_no_remove_buffered, new Object[]{"S", "S", 'S', OrePrefixes.stone}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.stone_button, 1, 0), bits_no_remove_buffered, new Object[]{OrePrefixes.stone}); GT_Log.out.println("GT_Mod: Adding Vanilla Convenience Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 3), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"f", "X", 'X', new ItemStack(Blocks.double_stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.gravel, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(Blocks.cobblestone, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.sand, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(Blocks.gravel, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stone, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 2), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stonebrick, 1, 0)}); - - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 0)}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 3)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.brick_block, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 4)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 5)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.nether_brick, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 6)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 7)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 1)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 2), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 2)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 3), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 3)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 4), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 4)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 5), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 5)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 6), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 6)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 7), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 7)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"s", "X", 'X', new ItemStack(Blocks.deadbush, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"s", "X", 'X', new ItemStack(Blocks.tallgrass, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"s", "X", 'X', OrePrefixes.treeSapling}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.comparator, 1, 0), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" T ", "TQT", "SSS", 'Q', OreDictNames.craftingQuartz, 'S', OrePrefixes.stoneSmooth, 'T', OreDictNames.craftingRedstoneTorch}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 3), bits_no_remove_buffered, new Object[]{"f", "X", 'X', new ItemStack(Blocks.double_stone_slab, 1, 8)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.gravel, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.cobblestone, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.sand, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.gravel, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stone, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 2), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stonebrick, 1, 0)}); + + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 0)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 8)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 3)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.brick_block, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 4)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 5)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.nether_brick, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 6)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.quartz_block, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 7)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 8)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 1), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 1)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 2), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 2)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 3), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 3)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 4), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 4)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 5), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 5)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 6), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 6)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 7), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 7)}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', new ItemStack(Blocks.deadbush, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', new ItemStack(Blocks.tallgrass, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 1, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', OrePrefixes.treeSapling}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.comparator, 1, 0), bits_no_remove_buffered, new Object[]{" T ", "TQT", "SSS", 'Q', OreDictNames.craftingQuartz, 'S', OrePrefixes.stoneSmooth, 'T', OreDictNames.craftingRedstoneTorch}); GT_Log.out.println("GT_Mod: Adding Tool Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" h ", "PwP", "WPW", 'P', OrePrefixes.plate.get(Materials.Steel), 'W', ItemList.Component_Minecart_Wheels_Steel}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{" h ", "PwP", "WPW", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'W', ItemList.Component_Minecart_Wheels_Iron}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), bits_no_remove_buffered, new Object[]{" h ", "PwP", "WPW", 'P', OrePrefixes.plate.get(Materials.Steel), 'W', ItemList.Component_Minecart_Wheels_Steel}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chest_minecart, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.furnace_minecart, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingFurnace}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.hopper_minecart, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.hopper, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.tnt_minecart, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.tnt, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chest_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingChest}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.furnace_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingFurnace}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.hopper_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.hopper, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.tnt_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.tnt, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_helmet, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_chestplate, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RhR", "RRR", "RRR", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_leggings, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", "R R", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_boots, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"R R", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_helmet, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_chestplate, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RhR", "RRR", "RRR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_leggings, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", "R R", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_boots, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"R R", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); GT_Log.out.println("GT_Mod: Adding Wool and Color releated Recipes."); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeOrange}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 2), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeMagenta}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 3), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightBlue}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 4), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeYellow}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 5), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLime}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 6), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePink}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 7), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGray}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 8), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightGray}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 9), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeCyan}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 10), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePurple}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 11), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlue}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 12), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBrown}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 13), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGreen}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 14), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeRed}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 15), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlack}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stained_glass, 8, 0), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"GGG", "GDG", "GGG", 'G', new ItemStack(Blocks.glass, 1), 'D', Dyes.dyeWhite}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 1), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeOrange}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 2), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeMagenta}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 3), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightBlue}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 4), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeYellow}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 5), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLime}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 6), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePink}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 7), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGray}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 8), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightGray}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 9), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeCyan}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 10), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePurple}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 11), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlue}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 12), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBrown}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 13), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGreen}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 14), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeRed}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 15), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlack}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stained_glass, 8, 0), bits_no_remove_buffered, new Object[]{"GGG", "GDG", "GGG", 'G', new ItemStack(Blocks.glass, 1), 'D', Dyes.dyeWhite}); GT_Log.out.println("GT_Mod: Putting a Potato on a Stick."); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_PotatoChips.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_PotatoChips}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_ChiliChips.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_ChiliChips}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_Fries.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.plateDouble.get(Materials.Paper), ItemList.Food_Fries}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Chum_On_Stick.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Chum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Raw_Potato}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick_Roasted.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Baked_Potato}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.bucket.get(Materials.Water), OrePrefixes.dust.get(Materials.Wheat)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Sugar.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Sugar)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Cocoa)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Chocolate)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Flat_Dough.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", ToolDictNames.craftingToolRollingPin}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bun.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bread.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", "foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Baguette.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"foodDough", "foodDough", "foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Cake.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_PotatoChips, OrePrefixes.dust.get(Materials.Chili)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Buns.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Breads.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguettes.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Buns}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Breads}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Baguettes}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Buns, OrePrefixes.dust.get(Materials.MeatCooked)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Chum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, OrePrefixes.dust.get(Materials.MeatCooked)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Chum}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_porkchop, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Steak.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_beef, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Food_Flat_Dough, OrePrefixes.dust.get(Materials.MeatCooked)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cheese.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "foodCheese"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Lemon.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "cropLemon"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Tomato.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "cropTomato"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Onion.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "cropOnion"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cucumber.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "cropCucumber"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', ItemList.Food_Baked_Bun}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', ItemList.Food_Baked_Bread}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', ItemList.Food_Baked_Baguette}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_PotatoChips.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', "cropPotato"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Cookie.get(4L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"kX", 'X', ItemList.Food_Dough_Chocolate}); - - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Fries.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"k", "X", 'X', "cropPotato"}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bowl, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"k", "X", 'X', OrePrefixes.plank.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Rubber, 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"k", "X", 'X', OrePrefixes.plate.get(Materials.Rubber)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, Materials.Flint, 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"f", "X", 'X', new ItemStack(Items.flint, 1, 32767)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.arrow, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{" H", " S ", "F ", 'H', new ItemStack(Items.flint, 1, 32767), 'S', OrePrefixes.stick.get(Materials.Wood), 'F', OreDictNames.craftingFeather}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_PotatoChips.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_PotatoChips}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_ChiliChips.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_ChiliChips}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_Fries.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.plateDouble.get(Materials.Paper), ItemList.Food_Fries}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Chum_On_Stick.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Chum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Raw_Potato}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick_Roasted.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Baked_Potato}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.bucket.get(Materials.Water), OrePrefixes.dust.get(Materials.Wheat)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Sugar.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Sugar)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Cocoa)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Chocolate)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Flat_Dough.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", ToolDictNames.craftingToolRollingPin}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bun.get(1L), bits_no_remove_buffered, new Object[]{"foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bread.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", "foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Baguette.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", "foodDough", "foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Cake.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_ChiliChips.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_PotatoChips, OrePrefixes.dust.get(Materials.Chili)}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Buns.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Breads.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguettes.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, OrePrefixes.dust.get(Materials.MeatCooked)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Chum}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, OrePrefixes.dust.get(Materials.MeatCooked)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Chum}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_porkchop, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_beef, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_porkchop, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_beef, 1)}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, new ItemStack(Items.cooked_porkchop, 1), new ItemStack(Items.cooked_porkchop, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, new ItemStack(Items.cooked_beef, 1), new ItemStack(Items.cooked_beef, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, new ItemStack(Items.cooked_porkchop, 1), new ItemStack(Items.cooked_porkchop, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, new ItemStack(Items.cooked_beef, 1), new ItemStack(Items.cooked_beef, 1)}); + + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, OrePrefixes.dust.get(Materials.MeatCooked)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cheese.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "foodCheese"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Lemon.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropLemon"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Tomato.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropTomato"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Onion.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropOnion"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cucumber.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropCucumber"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Bun}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Bread}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Baguette}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_PotatoChips.get(1L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropPotato"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Cookie.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Dough_Chocolate}); + + GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Fries.get(1L), bits_no_remove_buffered, new Object[]{"k", "X", 'X', "cropPotato"}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bowl, 1), bits_no_remove_buffered, new Object[]{"k", "X", 'X', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Rubber, 1L), bits_no_remove_buffered, new Object[]{"k", "X", 'X', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, Materials.Flint, 1L), bits_no_remove_buffered, new Object[]{"f", "X", 'X', new ItemStack(Items.flint, 1, 32767)}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.arrow, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{" H", " S ", "F ", 'H', new ItemStack(Items.flint, 1, 32767), 'S', OrePrefixes.stick.get(Materials.Wood), 'F', OreDictNames.craftingFeather}); GT_ModHandler.removeRecipe(new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks)); - GT_ModHandler.removeRecipeByOutput(ItemList.Food_Baked_Bread.get(1L)); - GT_ModHandler.removeRecipeByOutput(new ItemStack(Items.cookie, 1)); + GT_ModHandler.removeRecipeByOutputDelayed(ItemList.Food_Baked_Bread.get(1L)); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.cookie, 1)); GT_ModHandler.removeRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L)); if (null != GT_Utility.setStack(GT_ModHandler.getRecipeOutput(true, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L)), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "bronzeingotcrafting", true) ? 1L : 2L))) { GT_Log.out.println("GT_Mod: Changed Forestrys Bronze Recipe"); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "enchantmenttable", false)) { GT_Log.out.println("GT_Mod: Removing the Recipe of the Enchantment Table, to have more Fun at enchanting with the Anvil and Books from Dungeons."); - GT_ModHandler.removeRecipeByOutput(new ItemStack(Blocks.enchanting_table, 1)); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Blocks.enchanting_table, 1)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "enderchest", false)) { - GT_ModHandler.removeRecipeByOutput(new ItemStack(Blocks.ender_chest, 1)); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Blocks.ender_chest, 1)); } tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(null, new ItemStack(Blocks.sand, 1, 0), null, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), null, null, new ItemStack(Blocks.sand, 1, 0), null), new Object[]{"S", "A", "S", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', new ItemStack(Blocks.sand, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(tStack, tStack, tStack, tStack, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), tStack, tStack, tStack, tStack), new Object[]{"SSS", "SAS", "SSS", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', OrePrefixes.dust.get(Materials.Ash)}); + + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(null, new ItemStack(Blocks.sand, 1, 0), null, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), null, null, new ItemStack(Blocks.sand, 1, 0), null), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"S", "A", "S", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', new ItemStack(Blocks.sand, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(tStack, tStack, tStack, tStack, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), tStack, tStack, tStack, tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SSS", "SAS", "SSS", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', OrePrefixes.dust.get(Materials.Ash)}); GT_Log.out.println("GT_Mod: Adding Mixed Metal Ingot Recipes."); - GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Mixed_Metal_Ingot.get(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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(22L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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: Adding Rolling Machine Recipes."); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rail_Standard.get(4L), new Object[]{aTextIron1, aTextIron1, aTextIron1, 'X', OrePrefixes.ingot.get(Materials.Aluminium).toString()}); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rail_Standard.get(32L), new Object[]{aTextIron1, aTextIron1, aTextIron1, 'X', OrePrefixes.ingot.get(Materials.Titanium).toString()}); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rail_Standard.get(32L), new Object[]{aTextIron1, aTextIron1, aTextIron1, 'X', OrePrefixes.ingot.get(Materials.Tungsten).toString()}); - - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rail_Reinforced.get(32L), new Object[]{aTextIron1, aTextIron1, aTextIron1, 'X', OrePrefixes.ingot.get(Materials.TungstenSteel).toString()}); - - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rebar.get(2L), new Object[]{" X", " X ", "X ", 'X', OrePrefixes.ingot.get(Materials.Aluminium).toString()}); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rebar.get(16L), new Object[]{" X", " X ", "X ", 'X', OrePrefixes.ingot.get(Materials.Titanium).toString()}); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rebar.get(16L), new Object[]{" X", " X ", "X ", 'X', OrePrefixes.ingot.get(Materials.Tungsten).toString()}); - //GT_ModHandler.addRollingMachineRecipe(ItemList.RC_Rebar.get(48L), new Object[]{" X", " X ", "X ", 'X', OrePrefixes.ingot.get(Materials.TungstenSteel).toString()}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 2L, 3), tBitMask | GT_ModHandler.RecipeBits.MIRRORED, new Object[]{tHammer + "" + tFile, "XX", "XX", 'X', tIngot.get(Materials.Tin)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 0), tBitMask, new Object[]{tHammer + "X ", "XGX", " X" + tFile, 'X', OrePrefixes.nugget.get(Materials.Gold), 'G', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 3)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 1), tBitMask, new Object[]{tHammer + "X ", "XGX", " X" + tFile, 'X', tIngot.get(Materials.AnyIron), 'G', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 3)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 2), tBitMask, new Object[]{tHammer + "X ", "XGX", " X" + tFile, 'X', tIngot.get(Materials.Steel), 'G', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 3)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 0), tBitMask, new Object[]{tWrench + "PP", tHammer + "PP", 'P', OrePrefixes.plate.get(Materials.AnyIron)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 1), tBitMask, new Object[]{"GPG", "PGP", "GPG", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'G', new ItemStack(Blocks.glass_pane, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 2), tBitMask, new Object[]{"BPB", "PLP", "BPB", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'B', new ItemStack(Blocks.iron_bars, 1, 32767), 'L', new ItemStack(Blocks.lever, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 3), tBitMask, new Object[]{tWrench + "P", tHammer + "P", 'P', OrePrefixes.plate.get(Materials.AnyIron)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 4), tBitMask, new Object[]{tWrench + "P", tHammer + "P", 'P', OrePrefixes.plate.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 5), tBitMask, new Object[]{"BBB", "BFB", "BOB", 'B', OrePrefixes.ingot.get(Materials.Brick), 'F', new ItemStack(Items.fire_charge, 1, 32767), 'O', OreDictNames.craftingFurnace}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 6), tBitMask, new Object[]{"PUP", "BFB", "POP", 'P', OrePrefixes.plate.get(Materials.Steel), 'B', new ItemStack(Blocks.iron_bars, 1, 32767), 'F', new ItemStack(Items.fire_charge, 1, 32767), 'U', OrePrefixes.bucket.get(Materials.Empty), 'O', OreDictNames.craftingFurnace}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 7), tBitMask | GT_ModHandler.RecipeBits.MIRRORED, new Object[]{"PPP", tHammer + "G" + tWrench, "OTO", 'P', OrePrefixes.nugget.get(Materials.Gold), 'O', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 0), 'G', new ItemStack(Blocks.glass, 1, 32767), 'T', OreDictNames.craftingPiston}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 8), tBitMask | GT_ModHandler.RecipeBits.MIRRORED, new Object[]{"PPP", tHammer + "G" + tWrench, "OTO", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'O', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 1), 'G', new ItemStack(Blocks.glass, 1, 32767), 'T', OreDictNames.craftingPiston}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 9), tBitMask | GT_ModHandler.RecipeBits.MIRRORED, new Object[]{"PPP", tHammer + "G" + tWrench, "OTO", 'P', OrePrefixes.plate.get(Materials.Steel), 'O', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 2), 'G', new ItemStack(Blocks.glass, 1, 32767), 'T', OreDictNames.craftingPiston}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 10), tBitMask, new Object[]{" E ", " O ", "OIO", 'I', tIngot.get(Materials.Gold), 'E', OrePrefixes.gem.get(Materials.EnderPearl), 'O', OrePrefixes.stone.get(Materials.Obsidian)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 11), tBitMask, new Object[]{"OOO", "OEO", "OOO", 'E', OrePrefixes.gem.get(Materials.EnderPearl), 'O', OrePrefixes.stone.get(Materials.Obsidian)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 12), tBitMask, new Object[]{"GPG", "PAP", "GPG", 'P', OreDictNames.craftingPiston, 'A', OreDictNames.craftingAnvil, 'G', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 2)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 13), tBitMask, new Object[]{tWrench + "PP", tHammer + "PP", 'P', OrePrefixes.plate.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 14), tBitMask, new Object[]{"GPG", "PGP", "GPG", 'P', OrePrefixes.plate.get(Materials.Steel), 'G', new ItemStack(Blocks.glass_pane, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 8L, 15), tBitMask, new Object[]{"BPB", "PLP", "BPB", 'P', OrePrefixes.plate.get(Materials.Steel), 'B', new ItemStack(Blocks.iron_bars, 1, 32767), 'L', new ItemStack(Blocks.lever, 1, 32767)}); - - //GT_ModHandler.addCraftingRecipe(ItemList.RC_ShuntingWireFrame.get(6L), tBitMask, new Object[]{"PPP", "R" + tWrench + "R", "RRR", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'R', ItemList.RC_Rebar.get(1L)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 0), tBitMask, new Object[]{"IOI", "GEG", "IOI", 'I', tIngot.get(Materials.Gold), 'G', OrePrefixes.gem.get(Materials.Diamond), 'E', OrePrefixes.gem.get(Materials.EnderPearl), 'O', OrePrefixes.stone.get(Materials.Obsidian)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 3L, 1), tBitMask, new Object[]{"BPB", "P" + tWrench + "P", "BPB", 'P', OrePrefixes.plate.get(Materials.Steel), 'B', OrePrefixes.block.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 2), tBitMask, new Object[]{"IOI", "GEG", "IOI", 'I', tIngot.get(Materials.Gold), 'G', OrePrefixes.gem.get(Materials.Emerald), 'E', OrePrefixes.gem.get(Materials.EnderPearl), 'O', OrePrefixes.stone.get(Materials.Obsidian)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 4L, 3), tBitMask, new Object[]{"PPP", "PFP", "PPP", 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OreDictNames.craftingFurnace}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 5), tBitMask, new Object[]{" N ", "RCR", 'R', OrePrefixes.dust.get(Materials.Redstone), 'N', OrePrefixes.stone.get(Materials.Netherrack), 'C', new ItemStack(Items.cauldron, 1, 0)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 6), tBitMask, new Object[]{"SGS", "EDE", "SGS", 'E', OrePrefixes.gem.get(Materials.Emerald), 'S', OrePrefixes.plate.get(Materials.Steel), 'G', new ItemStack(Blocks.glass_pane, 1, 32767), 'D', new ItemStack(Blocks.dispenser, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 8), tBitMask, new Object[]{"IPI", "PCP", "IPI", 'P', OreDictNames.craftingPiston, 'I', tIngot.get(Materials.AnyIron), 'C', new ItemStack(Blocks.crafting_table, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 9), tBitMask, new Object[]{" I ", " T ", " D ", 'I', new ItemStack(Blocks.iron_bars, 1, 32767), 'T', GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 4), 'D', new ItemStack(Blocks.dispenser, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 10), tBitMask, new Object[]{" I ", "RTR", " D ", 'I', new ItemStack(Blocks.iron_bars, 1, 32767), 'T', GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 4), 'D', new ItemStack(Blocks.dispenser, 1, 32767), 'R', OrePrefixes.dust.get(Materials.Redstone)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 10), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RTR", 'T', GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 9), 'R', OrePrefixes.dust.get(Materials.Redstone)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 11), tBitMask, new Object[]{"PCP", "CSC", "PCP", 'P', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.plate.get(Materials.Steel), 'C', new ItemStack(Items.golden_carrot, 1, 0)}); - //if (GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DisableRCBlastFurnace", false)) { - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 4L, 12)); - //} - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 1L, 13), tBitMask, new Object[]{"TSB", "SCS", "PSP", 'P', OreDictNames.craftingPiston, 'S', OrePrefixes.plate.get(Materials.Steel), 'B', OreDictNames.craftingBook, 'C', new ItemStack(Blocks.crafting_table, 1, 32767), 'T', new ItemStack(Items.diamond_pickaxe, 1, 0)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 6L, 14), tBitMask, new Object[]{"PPP", "ISI", "PPP", 'P', OrePrefixes.plank.get(Materials.Wood), 'I', tIngot.get(Materials.AnyIron), 'S', "slimeball"}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, aTextMachineAlpha, 4L, 15), tBitMask, new Object[]{"PDP", "DBD", "PDP", 'P', OreDictNames.craftingPiston, 'B', OrePrefixes.block.get(Materials.Steel), 'D', OrePrefixes.gem.get(Materials.Diamond)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "machine.epsilon", 1L, 0), tBitMask, new Object[]{"PWP", "WWW", "PWP", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'W', OrePrefixes.wireGt02.get(Materials.Copper)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "tool.crowbar", 1L, 0), tBitMask, new Object[]{tHammer + "DS", "DSD", "SD" + tFile, 'S', OrePrefixes.ingot.get(Materials.Iron), 'D', Dyes.dyeRed}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "tool.crowbar.reinforced", 1L, 0), tBitMask, new Object[]{tHammer + "DS", "DSD", "SD" + tFile, 'S', OrePrefixes.ingot.get(Materials.Steel), 'D', Dyes.dyeRed}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "tool.whistle.tuner", 1L, 0), tBitMask | GT_ModHandler.RecipeBits.MIRRORED, new Object[]{"S" + tHammer + "S", "SSS", " S" + tFile, 'S', OrePrefixes.nugget.get(Materials.Iron)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.turbine.blade", 1L, 0), tBitMask, new Object[]{"S" + tFile, "S ", "S" + tHammer, 'S', tIngot.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.turbine.disk", 1L, 0), tBitMask, new Object[]{"SSS", "SBS", "SSS", 'B', OrePrefixes.block.get(Materials.Steel), 'S', GT_ModHandler.getModItem(aTextRailcraft, "part.turbine.blade", 1L, 0)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "part.turbine.rotor", 1L, 0), tBitMask, new Object[]{"SSS", " " + tWrench + " ", 'S', GT_ModHandler.getModItem(aTextRailcraft, "part.turbine.disk", 1L, 0)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "borehead.iron", 1L, 0), tBitMask, new Object[]{"SSS", "SBS", "SSS", 'B', OrePrefixes.block.get(Materials.Iron), 'S', tIngot.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "borehead.steel", 1L, 0), tBitMask, new Object[]{"SSS", "SBS", "SSS", 'B', OrePrefixes.block.get(Materials.Steel), 'S', tIngot.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "borehead.diamond", 1L, 0), tBitMask, new Object[]{"SSS", "SBS", "SSS", 'B', OrePrefixes.block.get(Materials.Diamond), 'S', tIngot.get(Materials.Steel)}); - - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "cart.loco.steam.solid", 1L, 0), tBitMask, new Object[]{"TTF", "TTF", "BCC", 'C', new ItemStack(Items.minecart, 1), 'T', GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 4), 'F', GT_ModHandler.getModItem(aTextRailcraft, aTextMachineBeta, 1L, 5), 'B', new ItemStack(Blocks.iron_bars, 1, 32767)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "cart.loco.electric", 1L, 0), tBitMask, new Object[]{"LP" + tWrench, "PEP", "GCG", 'C', new ItemStack(Items.minecart, 1), 'E', GT_ModHandler.getModItem(aTextRailcraft, "machine.epsilon", 1L, 0), 'G', GT_ModHandler.getModItem(aTextRailcraft, "part.gear", 1L, 2), 'L', new ItemStack(Blocks.redstone_lamp, 1, 32767), 'P', OrePrefixes.plate.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem(aTextRailcraft, "cart.bore", 1L, 0), tBitMask, new Object[]{"BCB", "FCF", tHammer + "A" + tWrench, 'C', new ItemStack(Items.minecart, 1), 'A', new ItemStack(Items.chest_minecart, 1), 'F', OreDictNames.craftingFurnace, 'B', OrePrefixes.block.get(Materials.Steel)}); - - GT_Log.out.println("GT_Mod: Beginning to add regular Crafting Recipes."); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("scaffold", 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", " S ", "S S", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); - - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.StainlessSteel), 'P', ItemList.Electric_Pump_HV, 'C', OrePrefixes.wireGt01.get(Materials.Pentacadmiummagnesiumhexaoxid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.Titanium), 'P', ItemList.Electric_Pump_EV, 'C', OrePrefixes.wireGt01.get(Materials.Titaniumonabariumdecacoppereikosaoxid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 12L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_IV, 'C', OrePrefixes.wireGt01.get(Materials.Uraniumtriplatinid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 16L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.NiobiumTitanium), 'P', ItemList.Electric_Pump_IV, 'C', OrePrefixes.wireGt01.get(Materials.Vanadiumtriindinid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 14L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.Enderium), 'P', ItemList.Electric_Pump_LuV, 'C', OrePrefixes.wireGt01.get(Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 32L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.Naquadah), 'P', ItemList.Electric_Pump_ZPM, 'C', OrePrefixes.wireGt01.get(Materials.Tetranaquadahdiindiumhexaplatiumosminid)}); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 64L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.Neutronium), 'P', ItemList.Electric_Pump_ZPM, 'C', OrePrefixes.wireGt01.get(Materials.SuperconductorZPM)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PPk", 'P', OrePrefixes.plate.get(Materials.Paper)}); - - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Gold.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.Gold)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Iron.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.AnyIron)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Bronze.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.Bronze)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Copper.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.AnyCopper)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Tin.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Lead.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.Lead)}); - //GT_ModHandler.addCraftingRecipe(ItemList.IC2_Item_Casing_Steel.get(1L), new Object[]{"h P", 'P', OrePrefixes.plate.get(Materials.Steel)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 2), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.Sulfur), 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 6), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.TricalciumPhosphate), 'S', OrePrefixes.stick.get(Materials.Wood)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{GT_ModHandler.getIC2Item("reactorPlating", 1L), OrePrefixes.plate.get(Materials.Lead)}); + GT_ModHandler.removeRecipeByOutputDelayed(ItemList.IC2_Mixed_Metal_Ingot.get(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Long_Distance_Pipeline_Fluid.get(1L),GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE| GT_ModHandler.RecipeBits.REVERSIBLE| GT_ModHandler.RecipeBits.DISMANTLEABLE, 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| GT_ModHandler.RecipeBits.REVERSIBLE| GT_ModHandler.RecipeBits.DISMANTLEABLE, 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| GT_ModHandler.RecipeBits.REVERSIBLE| GT_ModHandler.RecipeBits.DISMANTLEABLE, 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| GT_ModHandler.RecipeBits.REVERSIBLE| GT_ModHandler.RecipeBits.DISMANTLEABLE, new Object[]{"PPP", "IwI", "PPP", 'P',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), 'I', GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 1L)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(22L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSG)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(24L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSE)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(26L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(28L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSE)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(30L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSG)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(32L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(34L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(36L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(38L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.Draconium)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(40L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(42L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(44L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.Draconium)}); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(48L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(52L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(56L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(64L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.BlackPlutonium)}); + + GT_Log.out.println("GT_Mod: Beginning to add regular Crafting Recipes."); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("scaffold", 4L), bits_no_remove_buffered, new Object[]{"WWW", " S ", "S S", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.AnyIron), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Paper, 1L), bits_no_remove_buffered, new Object[]{"PPk", 'P', OrePrefixes.plate.get(Materials.Paper)}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 2), bits_no_remove_buffered, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.Sulfur), 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 6), bits_no_remove_buffered, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.TricalciumPhosphate), 'S', OrePrefixes.stick.get(Materials.Wood)}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.AnyBronze)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Titanium)}); + + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), bits_no_remove_buffered, new Object[]{"AIA", "I I", "AIA", 'I', new ItemStack(Blocks.iron_bars, 1), 'A', OrePrefixes.plate.get(Materials.Aluminium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1L), bits_no_remove_buffered, new Object[]{GT_ModHandler.getIC2Item("reactorPlating", 1L), OrePrefixes.plate.get(Materials.Lead)}); if (!Materials.Steel.mBlastFurnaceRequired) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal)}); } if (GT_Mod.gregtechproxy.mNerfDustCrafting) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.YttriumBariumCuprate, 23L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 7L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenCarbide, 7L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.VanadiumGallium, 15L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.NiobiumTitanium, 7L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmiridium, 15L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); - GT_ModHandler.removeRecipeByOutput(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L)); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Nichrome, 15L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.YttriumBariumCuprate, 23L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenCarbide, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.VanadiumGallium, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.NiobiumTitanium, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmiridium, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Electrum, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.removeRecipeByOutputDelayed(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L)); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Zinc)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Brass, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Zinc)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Tin)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Bronze, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tin)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Invar, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cupronickel, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Nichrome, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); } else { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 6L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.YttriumBariumCuprate, 6L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenCarbide, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumGallium, 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmiridium, 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); - } - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.BlackBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedSteel, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.SterlingSilver), OrePrefixes.dust.get(Materials.BismuthBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlueSteel, 8L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.RoseGold), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Molybdenum)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Chrome)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Cobalt)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Kanthal, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.EnergeticAlloy), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VividAlloy, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.EnergeticSilver), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectricalSteel, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Platinum)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.EnderPearl)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ShadowIron, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manyullyn, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Rubracium), OrePrefixes.dust.get(Materials.Mithril)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Celenegil, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Platinum), OrePrefixes.dust.get(Materials.Orichalcum)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumSteel, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Vanadium), OrePrefixes.dust.get(Materials.Chrome)}); - - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Gold)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Inolashite, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Alduorite), OrePrefixes.dust.get(Materials.Ceruclase)}); - - - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("carbonFiber", 1L)); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenCarbide, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumGallium, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmiridium, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Zinc)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Zinc)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Tin)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tin)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cupronickel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); + } + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Bismuth), OrePrefixes.dust.get(Materials.Zinc), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.BlackBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.SterlingSilver), OrePrefixes.dust.get(Materials.BismuthBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlueSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.RoseGold), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Molybdenum)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Cobalt)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Kanthal, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Chrome)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Cobalt)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Kanthal, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Coal), OrePrefixes.dustTiny.get(Materials.Silicon), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Manganese), OrePrefixes.dustSmall.get(Materials.Manganese), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Coal), OrePrefixes.dustTiny.get(Materials.Silicon), OrePrefixes.dustTiny.get(Materials.Vanadium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSLA, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Niobium), OrePrefixes.dustSmall.get(Materials.AnnealedCopper), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Vanadium), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Molybdenum), OrePrefixes.dustSmall.get(Materials.Titanium), OrePrefixes.dustTiny.get(Materials.Carbon)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedstoneAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Silicon), OrePrefixes.dust.get(Materials.Coal)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CrudeSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Clay), OrePrefixes.dust.get(Materials.Flint), OrePrefixes.dust.get(Materials.Stone)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ConductiveIron, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.RedstoneAlloy), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Silver)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ConductiveIron), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.BlackSteel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticSilver, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ConductiveIron), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.BlackSteel)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VibrantAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticAlloy), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VividAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticSilver), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectricalSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Silicon)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PulsatingIron, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.EnderPearl), OrePrefixes.dust.get(Materials.RedstoneAlloy)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soularium, 2L), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.soul_sand, 1, 32767), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Ash)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ElectricalSteel), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Obsidian)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderiumBase, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Platinum)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.EnderPearl)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ShadowIron, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manyullyn, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt)}); + //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.AstralSilver, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Thaumium)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Haderoth, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Rubracium), OrePrefixes.dust.get(Materials.Mithril)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Celenegil, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Platinum), OrePrefixes.dust.get(Materials.Orichalcum)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumSteel, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Vanadium), OrePrefixes.dust.get(Materials.Chrome)}); + + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.LiveRoot), OrePrefixes.dustTiny.get(Materials.Gold)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Hepatizon, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Silver), OrePrefixes.dustTiny.get(Materials.Silver), OrePrefixes.dustTiny.get(Materials.Silver)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Angmallen, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Inolashite, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Alduorite), OrePrefixes.dust.get(Materials.Ceruclase)}); + + + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IndiumGalliumPhosphide, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Indium), OrePrefixes.dust.get(Materials.Gallium), OrePrefixes.dust.get(Materials.Phosphorus)}); + + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Potassium), OrePrefixes.cell.get(Materials.Nitrogen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen)}); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("carbonFiber", 1L)); + if (GT_Mod.gregtechproxy.mDisableIC2Cables) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("copperCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("goldCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("tinCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("ironCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("insulatedTinCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("detectorCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("splitterCableItem", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("electrolyzer", 1L)); + 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")) { - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("copperCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("goldCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("tinCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("ironCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("insulatedTinCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("detectorCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("splitterCableItem", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("electrolyzer", 1L)); - codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("cutter", 1L)); + iToRemoveAndHide.forEach(item -> { + codechicken.nei.api.API.hideItem(item); + GT_ModHandler.removeRecipeByOutputDelayed(item); + }); } - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("batBox", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("batBox", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("mfeUnit", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mfeUnit", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("lvTransformer", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("lvTransformer", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("mvTransformer", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mvTransformer", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"CMC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("hvTransformer", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("hvTransformer", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("evTransformer", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("evTransformer", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("cesuUnit", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cesuUnit", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("luminator", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("teleporter", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("teleporter", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("energyOMat", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyOMat", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("advBattery", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("advBattery", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("boatElectric", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("boatElectric", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("cropnalyzer", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cropnalyzer", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("coil", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("coil", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"CCC", "CXC", "CCC", 'C', OrePrefixes.wireGt01.get(Materials.Copper), 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("powerunit", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunit", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("powerunitsmall", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunitsmall", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("remote", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("remote", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("odScanner", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("odScanner", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("ovScanner", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ovScanner", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("solarHelmet", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("staticBoots", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("staticBoots", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("ecMeter", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ecMeter", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("obscurator", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("obscurator", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("overclockerUpgrade", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("overclockerUpgrade", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("transformerUpgrade", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("transformerUpgrade", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("energyStorageUpgrade", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyStorageUpgrade", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("ejectorUpgrade", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ejectorUpgrade", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("suBattery", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("suBattery", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("pullingUpgrade", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("pullingUpgrade", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("cutter", 1L)); + + Arrays.stream(new String[]{ + "batBox", "mfeUnit", "lvTransformer", "mvTransformer", "hvTransformer", "evTransformer", "cesuUnit", "luminator", "teleporter", "energyOMat", + "advBattery", "boatElectric", "cropnalyzer", "coil", "powerunit", "powerunitsmall", "remote", "odScanner", "ovScanner", "solarHelmet", "staticBoots", + "ecMeter", "obscurator", "overclockerUpgrade", "transformerUpgrade", "energyStorageUpgrade", "ejectorUpgrade", "suBattery", "frequencyTransmitter", + "pullingUpgrade" + }).map(x -> GT_ModHandler.getIC2Item(x, 1L)).forEach(GT_ModHandler::removeRecipeByOutputDelayed); + + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("batBox", 1L), bits_no_remove_buffered, new Object[]{"PCP", "BBB", "PPP", 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.plank.get(Materials.Wood), 'B', OrePrefixes.battery.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mfeUnit", 1L), bits_no_remove_buffered, new Object[]{"CEC", "EME", "CEC", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'E', OrePrefixes.battery.get(Materials.Elite), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("lvTransformer", 1L), bits_no_remove_buffered, new Object[]{"PCP", "POP", "PCP", 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'O', GT_ModHandler.getIC2Item("coil", 1L), 'P', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mvTransformer", 1L), bits_no_remove_buffered, new Object[]{"CMC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("hvTransformer", 1L), bits_no_remove_buffered, new Object[]{" C ", "IMB", " C ", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'M', GT_ModHandler.getIC2Item("mvTransformer", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("evTransformer", 1L), bits_no_remove_buffered, new Object[]{" C ", "IMB", " C ", 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'M', GT_ModHandler.getIC2Item("hvTransformer", 1L), 'I', OrePrefixes.circuit.get(Materials.Advanced), 'B', OrePrefixes.battery.get(Materials.Master)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cesuUnit", 1L), bits_no_remove_buffered, new Object[]{"PCP", "BBB", "PPP", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("teleporter", 1L), bits_no_remove_buffered, new Object[]{"GFG", "CMC", "GDG", 'C', OrePrefixes.cableGt01.get(Materials.Platinum), 'G', OrePrefixes.circuit.get(Materials.Advanced), 'D', OrePrefixes.gem.get(Materials.Diamond), 'M', GT_ModHandler.getIC2Item("machine", 1L), 'F', GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyOMat", 1L), bits_no_remove_buffered, new Object[]{"RBR", "CMC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.battery.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("advBattery", 1L), bits_no_remove_buffered, new Object[]{"CTC", "TST", "TLT", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'S', OrePrefixes.dust.get(Materials.Sulfur), 'L', OrePrefixes.dust.get(Materials.Lead), 'T', GT_ModHandler.getIC2Item("casingbronze", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("boatElectric", 1L), bits_no_remove_buffered, new Object[]{"CCC", "XWX", aTextIron2, 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'X', OrePrefixes.plate.get(Materials.Iron), 'W', GT_ModHandler.getIC2Item("waterMill", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cropnalyzer", 1L), bits_no_remove_buffered, new Object[]{"CC ", "RGR", "RIR", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'R', OrePrefixes.dust.get(Materials.Redstone), 'G', OrePrefixes.block.get(Materials.Glass), 'I', OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("coil", 1L), bits_no_remove_buffered, new Object[]{"CCC", "CXC", "CCC", 'C', OrePrefixes.wireGt01.get(Materials.Copper), 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunit", 1L), bits_no_remove_buffered, new Object[]{"BCA", "BIM", "BCA", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'B', OrePrefixes.battery.get(Materials.Basic), 'A', GT_ModHandler.getIC2Item("casingiron", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("elemotor", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunitsmall", 1L), bits_no_remove_buffered, new Object[]{" CA", "BIM", " CA", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'B', OrePrefixes.battery.get(Materials.Basic), 'A', GT_ModHandler.getIC2Item("casingiron", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("elemotor", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("remote", 1L), bits_no_remove_buffered, new Object[]{" C ", "TLT", " F ", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'L', OrePrefixes.dust.get(Materials.Lapis), 'T', GT_ModHandler.getIC2Item("casingtin", 1L), 'F', GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("odScanner", 1L), bits_no_remove_buffered, new Object[]{"PGP", "CBC", "WWW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'B', OrePrefixes.battery.get(Materials.Advanced), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', GT_ModHandler.getIC2Item("casinggold", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ovScanner", 1L), bits_no_remove_buffered, new Object[]{"PDP", "GCG", "WSW", 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'D', OrePrefixes.battery.get(Materials.Elite), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', GT_ModHandler.getIC2Item("casinggold", 1L), 'S', GT_ModHandler.getIC2Item("odScanner", 1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("staticBoots", 1L), bits_no_remove_buffered, new Object[]{"I I", "IWI", "CCC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'I', OrePrefixes.ingot.get(Materials.Iron), 'W', new ItemStack(Blocks.wool)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ecMeter", 1L), bits_no_remove_buffered, new Object[]{" G ", "CIC", "C C", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'I', OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("obscurator", 1L), bits_no_remove_buffered, new Object[]{"RER", "CAC", "RRR", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.dust.get(Materials.Redstone), 'E', OrePrefixes.battery.get(Materials.Advanced), 'A', OrePrefixes.circuit.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("overclockerUpgrade", 1L), bits_no_remove_buffered, new Object[]{"CCC", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'C', GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), 'E', OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("transformerUpgrade", 1L), bits_no_remove_buffered, new Object[]{"GGG", "WTW", "GEG", 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'T', GT_ModHandler.getIC2Item("mvTransformer", 1L), 'E', OrePrefixes.circuit.get(Materials.Basic), 'G', OrePrefixes.block.get(Materials.Glass)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyStorageUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PPP", "WBW", "PEP", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'E', OrePrefixes.circuit.get(Materials.Basic), 'P', OrePrefixes.plank.get(Materials.Wood), 'B', OrePrefixes.battery.get(Materials.Basic)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ejectorUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PHP", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'E', OrePrefixes.circuit.get(Materials.Basic), 'P', new ItemStack(Blocks.piston), 'H', new ItemStack(Blocks.hopper)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("suBattery", 1L), bits_no_remove_buffered, new Object[]{"W", "C", "R", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'C', OrePrefixes.dust.get(Materials.HydratedCoal), 'R', OrePrefixes.dust.get(Materials.Redstone)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("pullingUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PHP", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'P', new ItemStack(Blocks.sticky_piston), 'R', new ItemStack(Blocks.hopper), 'E', OrePrefixes.circuit.get(Materials.Basic)}); } else { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"GGG", "EDE", "GGG", 'G', new ItemStack(Blocks.glass, 1, 32767), 'D', OrePrefixes.dust.get(Materials.Silver), 'E', ItemList.IC2_Energium_Dust.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L), bits_no_remove_buffered, new Object[]{"GGG", "EDE", "GGG", 'G', new ItemStack(Blocks.glass, 1, 32767), 'D', OrePrefixes.dust.get(Materials.Silver), 'E', ItemList.IC2_Energium_Dust.get(1L)}); } -// if (Loader.isModLoaded("ImmersiveEngineering")) { -// GT_ModHandler.removeRecipeByOutput(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 4)); -// GT_ModHandler.removeRecipeByOutput(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4)); -// GT_ModHandler.removeRecipeByOutput(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 4)); -// } - if (Loader.isModLoaded("NotEnoughItems")) { codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorUraniumSimple", 1L, 1)); codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorUraniumDual", 1L, 1)); @@ -680,167 +566,139 @@ public class GT_CraftingRecipeLoader implements Runnable { codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXDual", 1L, 1)); codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXQuad", 1L, 1)); } - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("UranFuel", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.ingot.get(Materials.Plutonium)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("UranFuel", 1L), bits_no_remove_buffered, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.nugget.get(Materials.Uranium235)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("MOXFuel", 1L), bits_no_remove_buffered, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.ingot.get(Materials.Plutonium)}); if (!GregTech_API.mIC2Classic) { - GT_ModHandler.addCraftingRecipe(ItemList.Uraniumcell_2.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.Uraniumcell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Uraniumcell_4.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.Uraniumcell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Moxcell_2.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.Moxcell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Moxcell_4.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.Moxcell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); - - GT_ModHandler.removeRecipeByOutput(Ic2Items.miningLaser.copy());//TODO --- CHECK LASER RECIPES - GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), 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(), 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(), 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(), 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.removeRecipeByOutput(ItemList.IC2_Energium_Dust.get(1L)); - //if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "energycrystalruby", true)) { - // GT_ModHandler.addCraftingRecipe(ItemList.IC2_Energium_Dust.get(9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RDR", "DRD", "RDR", 'R', OrePrefixes.dust.get(Materials.Redstone), 'D', OrePrefixes.dust.get(Materials.Ruby)}); - //} else { - // GT_ModHandler.addCraftingRecipe(ItemList.IC2_Energium_Dust.get(9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RDR", "DRD", "RDR", 'R', OrePrefixes.dust.get(Materials.Redstone), 'D', OrePrefixes.dust.get(Materials.Diamond)}); - //} - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("lapotronCrystal", 1L)); - //for (Materials tCMat : new Materials[]{Materials.Lapis, Materials.Lazurite, Materials.Sodalite}) { - //GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("lapotronCrystal", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.gemExquisite.get(Materials.Sapphire), OrePrefixes.stick.get(tCMat), ItemList.Circuit_Parts_Wiring_Elite}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("lapotronCrystal", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"LCL", "RSR", "LCL", 'C', OrePrefixes.circuit.get(Materials.Data), 'S', GT_ModHandler.getIC2Item("energyCrystal", 1L, 32767), 'L', OrePrefixes.plate.get(tCMat), 'R', OrePrefixes.stick.get(tCMat)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("lapotronCrystal", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"LCL", "RSR", "LCL", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'S', OrePrefixes.gemFlawless.get(Materials.Sapphire), 'L', OrePrefixes.plate.get(tCMat), 'R', OrePrefixes.stick.get(tCMat)}); - //} - GT_ModHandler.removeRecipe(GT_ModHandler.getIC2Item("miningPipe", 8)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningPipe", 1), new Object[]{"hPf", 'P', OrePrefixes.pipeSmall.get(Materials.Steel)}); + GT_ModHandler.removeRecipeByOutputDelayed(Ic2Items.miningLaser.copy()); + GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Diamond), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); + GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Ruby), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); + GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Jasper), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); + GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.GarnetRed), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); + } + GT_ModHandler.removeRecipeDelayed(GT_ModHandler.getIC2Item("miningPipe", 8)); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningPipe", 1), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"hPf", 'P', OrePrefixes.pipeSmall.get(Materials.Steel)}); GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Steel, 1), GT_ModHandler.getIC2Item("miningPipe", 1), 200, 16); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("luminator", 16L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RTR", "GHG", "GGG", 'H', OrePrefixes.cell.get(Materials.Mercury), 'T', OrePrefixes.ingot.get(Materials.Tin), 'R', OrePrefixes.ingot.get(Materials.AnyIron), 'G', new ItemStack(Blocks.glass, 1)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("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.removeRecipe(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 0), tStack, tStack, tStack, tStack); - GT_ModHandler.removeRecipe(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 1), tStack, tStack, tStack, tStack); - GT_ModHandler.removeRecipe(null, tStack = new ItemStack(Items.coal, 1), null, tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), tStack, null, tStack, null); + GT_ModHandler.removeRecipeDelayed(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 0), tStack, tStack, tStack, tStack); + GT_ModHandler.removeRecipeDelayed(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 1), tStack, tStack, tStack, tStack); + GT_ModHandler.removeRecipeDelayed(null, tStack = new ItemStack(Items.coal, 1), null, tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), tStack, null, tStack, null); GT_ModHandler.removeFurnaceSmelting(new ItemStack(Blocks.hopper)); - GT_Log.out.println("GT_Mod: Applying harder Recipes for several Blocks."); + + GT_Log.out.println("GT_Mod: Applying harder Recipes for several Blocks."); // TODO: Not Buffered + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "blockbreaker", false)) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.removeRecipe(new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.iron_pickaxe, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.piston, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.redstone, 1), new ItemStack(Blocks.cobblestone, 1)), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("crophavester", 1L)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("crophavester", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"ACA", "PMS", "WOW", 'M', ItemList.Hull_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'A', ItemList.Robot_Arm_HV, 'P', ItemList.Electric_Piston_HV, 'S', ItemList.Sensor_HV, 'W', OrePrefixes.toolHeadSense.get(Materials.StainlessSteel), 'O', ItemList.Conveyor_Module_HV}); - } - //if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "nuclearReactor", true)) && - //(GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("nuclearReactor", 1L)))) { - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("nuclearReactor", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PMP", "PAP", 'P', OrePrefixes.plateDense.get(Materials.Lead), 'C', OrePrefixes.circuit.get(Materials.Elite), 'M', GT_ModHandler.getIC2Item("reactorChamber", 1), 'A', ItemList.Robot_Arm_EV}); - - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorChamber", 1L)); - //GT_Values.RA.addAssemblerRecipe(ItemList.Hull_EV.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lead, 4), GT_ModHandler.getIC2Item("reactorChamber", 1), 200, 256); - - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorvessel", 1L)); - //GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Lead, 1), Materials.Concrete.getMolten(144), GT_ModHandler.getIC2Item("reactorvessel", 1), GT_Values.NI, GT_Values.NI, null, 400, 80); - - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorAccessHatch", 1L)); - //GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("reactorvessel", 1L), ItemList.Conveyor_Module_EV.get(1), GT_ModHandler.getIC2Item("reactorAccessHatch", 1L), 200, 80); - - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorFluidPort", 1L)); - //GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("reactorvessel", 1L), ItemList.Electric_Pump_EV.get(1), GT_ModHandler.getIC2Item("reactorFluidPort", 1L), 200, 80); - - //GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorRedstonePort", 1L)); - //GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("reactorvessel", 1L), OrePrefixes.circuit.get(Materials.Elite), 1,GT_Values.NF, GT_ModHandler.getIC2Item("reactorRedstonePort", 1L), 200, 80); - //} - if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "rtg", true)) && - (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("RTGenerator", 1L)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("RTGenerator", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"III", "IMI", "ICI", 'I', OrePrefixes.itemCasing.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Master), 'M', ItemList.Hull_IV}); - - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("RTHeatGenerator", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("RTHeatGenerator", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("carbonrotor", 1L)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("carbonrotor", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("steelrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("steelrotor", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("ironrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironrotor", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.removeRecipeByOutput(GT_ModHandler.getIC2Item("woodrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("woodrotor", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"dBS", "BTB", "SBw", 'B', GT_ModHandler.getIC2Item("woodrotorblade", 1), 'S', OrePrefixes.screw.get(Materials.WroughtIron), 'T', OrePrefixes.stickLong.get(Materials.WroughtIron)}); + tStack = GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.iron_pickaxe, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.piston, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.redstone, 1), new ItemStack(Blocks.cobblestone, 1)); + GT_ModHandler.removeRecipeDelayed(tStack); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered, new Object[]{"RGR", "RPR", "RCR", 'G', OreDictNames.craftingGrinder, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'R', OrePrefixes.plate.get(Materials.Steel), 'P', OreDictNames.craftingPiston} + ); + } + if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "beryliumreflector", true))) { + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1)); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[]{" N ", "NBN", " N ", 'B', OrePrefixes.plateDouble.get(Materials.Beryllium), 'N', GT_ModHandler.getIC2Item("reactorReflector", 1L, 1)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[]{" B ", "NCN", " B ", 'B', OrePrefixes.plate.get(Materials.Beryllium), 'N', GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), 'C', OrePrefixes.plate.get(Materials.TungstenCarbide)}); + } + if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "reflector", true))) { + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1)); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[]{"TGT", "GSG", "TGT", 'T', OrePrefixes.plate.get(Materials.Tin), 'G', OrePrefixes.dust.get(Materials.Graphite), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[]{"TTT", "GSG", "TTT", 'T', OrePrefixes.plate.get(Materials.TinAlloy), 'G', OrePrefixes.dust.get(Materials.Graphite), 'S', OrePrefixes.plate.get(Materials.Beryllium)}); + } + 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}); + } + 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.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)}); + } + 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.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.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.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)}); } if (GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L) != null) { tStack = GT_ModHandler.getRecipeOutput(GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), new ItemStack(Items.redstone, 1), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L), new ItemStack(Items.diamond_pickaxe, 1), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L)); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "quarry", true)) { - GT_ModHandler.removeRecipeByOutput(tStack); - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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.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)}); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "quarry", false)) { - GT_ModHandler.removeRecipeByOutput(tStack); + GT_ModHandler.removeRecipeByOutputDelayed(tStack); } } + if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "sugarpaper", true))) { - GT_ModHandler.removeRecipeByOutput(new ItemStack(Items.paper)); - GT_ModHandler.removeRecipeByOutput(new ItemStack(Items.sugar)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 2), new Object[]{"SSS", " m ", 'S', new ItemStack(Items.reeds)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1), new Object[]{"Sm ", 'S', new ItemStack(Items.reeds)}); -// ItemStack brick = new ItemStack(new ItemStack(Blocks.stone_slab).getItem().setContainerItem(new ItemStack(Blocks.stone_slab).getItem())); -// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), new Object[]{" C ", "SSS", " C ", 'S', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), 'C', brick}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), new Object[]{" C ", "SSS", " C ", 'S', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), 'C', new ItemStack(Blocks.stone_slab)}); -// GameRegistry.addRecipe(GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), " C ", "SSS", " C ", 'S', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), 'C', brick); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.paper)); + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.sugar)); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 2), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SSS", " m ", 'S', new ItemStack(Items.reeds)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"Sm ", 'S', new ItemStack(Items.reeds)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" C ", "SSS", " C ", 'S', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), 'C', new ItemStack(Blocks.stone_slab)}); } GT_Log.out.println("GT_Mod: Applying Recipes for Tools"); - if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "nanosaber", true)) && - (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("nanoSaber", 1L)))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("nanoSaber", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, 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, "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)}); } + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "namefix", true)) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.removeRecipeByOutput(new ItemStack(Items.flint_and_steel, 1)) ? new ItemStack(Items.flint_and_steel, 1) : null, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"S ", " F", 'F', new ItemStack(Items.flint, 1), 'S', "nuggetSteel"}); - } - if (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("diamondDrill", 1L))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("diamondDrill", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" D ", "DMD", "TAT", 'M', GT_ModHandler.getIC2Item("miningDrill", 1L, 32767), 'D', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Titanium), 'A', OrePrefixes.circuit.get(Materials.Advanced)}); - } - if (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("miningDrill", 1L))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningDrill", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S ", "SCS", "SBS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); - } - if (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("chainsaw", 1L))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("chainsaw", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BS ", "SCS", " SS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); - } - if (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("electricHoe", 1L))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricHoe", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SS ", " C ", " B ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); - } - if (GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("electricTreetap", 1L))) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricTreetap", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" B ", "SCS", "S ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); - } + GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.flint_and_steel, 1)); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.flint_and_steel, 1), bits_no_remove_buffered, new Object[]{"S ", " F", 'F', new ItemStack(Items.flint, 1), 'S', "nuggetSteel"}); + } + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("diamondDrill", 1L)); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("diamondDrill", 1L), bits_no_remove_buffered, new Object[]{" D ", "DMD", "TAT", 'M', GT_ModHandler.getIC2Item("miningDrill", 1L, 32767), 'D', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Titanium), 'A', OrePrefixes.circuit.get(Materials.Advanced)}); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("miningDrill", 1L)); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningDrill", 1L), bits_no_remove_buffered, new Object[]{" S ", "SCS", "SBS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("chainsaw", 1L)); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("chainsaw", 1L), bits_no_remove_buffered, new Object[]{"BS ", "SCS", " SS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("electricHoe", 1L)); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricHoe", 1L), bits_no_remove_buffered, new Object[]{"SS ", " C ", " B ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("electricTreetap", 1L)); + //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricTreetap", 1L), bits_no_remove_buffered, new Object[]{" B ", "SCS", "S ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + + + GT_Log.out.println("GT_Mod: Removing Q-Armor Recipes if configured."); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QHelmet", false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("quantumHelmet", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("quantumHelmet", 1L)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QPlate", false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("quantumBodyarmor", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("quantumBodyarmor", 1L)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QLegs", false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("quantumLeggings", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("quantumLeggings", 1L)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QBoots", false)) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("quantumBoots", 1L)); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("quantumBoots", 1L)); } if (Loader.isModLoaded("GraviSuite")) { - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 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", "advNanoChestPlate", 1, GT_Values.W)); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W), bits_no_remove_buffered, new Object[]{"CJC", "TNT", "WPW", 'C', OrePrefixes.plateAlloy.get(Materials.Advanced), 'T', OrePrefixes.plate.get(Materials.TungstenSteel), 'J', GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), 'N', GT_ModHandler.getModItem("IC2","itemArmorNanoChestplate", 1, GT_Values.W), 'W', OrePrefixes.wireGt12.get(Materials.Platinum), 'P', OrePrefixes.circuit.get(Materials.Elite)}); - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("GraviSuite", "advLappack", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advLappack", 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", "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.removeRecipeByOutput(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), new Object[]{"CJC", "EXE", "YZY", 'C', OrePrefixes.plateAlloy.get(Materials.Carbon), 'J', GT_ModHandler.getModItem("IC2", "itemArmorJetpackElectric", 1, GT_Values.W), 'E', OrePrefixes.plate.get(Materials.Titanium), 'X', GT_ModHandler.getModItem("IC2", "itemArmorAlloyChestplate", 1L), 'Z', OrePrefixes.circuit.get(Materials.Data), 'Y', OrePrefixes.wireGt02.get(Materials.Platinum)}); + GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W)); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), bits_no_remove_buffered, new Object[]{"CJC", "EXE", "YZY", 'C', OrePrefixes.plateAlloy.get(Materials.Carbon), 'J', GT_ModHandler.getModItem("IC2", "itemArmorJetpackElectric", 1, GT_Values.W), 'E', OrePrefixes.plate.get(Materials.Titanium), 'X', GT_ModHandler.getModItem("IC2", "itemArmorAlloyChestplate", 1L), 'Z', OrePrefixes.circuit.get(Materials.Data), 'Y', OrePrefixes.wireGt02.get(Materials.Platinum)}); } GT_ModHandler.addShapelessCraftingRecipe(Materials.Fireclay.getDust(2), new Object[]{Materials.Brick.getDust(1), Materials.Clay.getDust(1)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_CropLoader.java b/src/main/java/gregtech/loaders/postload/GT_CropLoader.java index 8ec6bc85bb..4f9059c753 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CropLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CropLoader.java @@ -10,8 +10,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_CropLoader - implements Runnable { +public class GT_CropLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register Crops to IC2."); try { @@ -391,4 +391,4 @@ public class GT_CropLoader e.printStackTrace(GT_Log.err); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java b/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java index 7b858a00a8..1d6d28dda1 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ItemMaxStacksizeLoader.java @@ -8,8 +8,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; -public class GT_ItemMaxStacksizeLoader - implements Runnable { +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_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index b769e7819c..2e49a3888c 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -55,6 +55,7 @@ public class GT_MachineRecipeLoader implements Runnable { private static final String aTextEBXL = "ExtrabiomesXL"; private static final String aTextTCGTPage = "gt.research.page.1."; private static final Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); + @Override public void run() { GT_Log.out.println("GT_Mod: Adding non-OreDict Machine Recipes."); try { @@ -63,7 +64,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Items.gunpowder), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.wool, 1, 32767), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.gravel), ic2.api.recipe.Recipes.oreWashing.getRecipes(), GT_Values.NI); - } catch (Throwable e) { + } catch (Throwable ignored) { } GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorUraniumSimple", 1, 1)); GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorMOXSimple", 1, 1)); @@ -82,64 +83,47 @@ public class GT_MachineRecipeLoader implements Runnable { e.printStackTrace(GT_Log.err); } -// GT_Values.RA.addArcFurnaceRecipe(ItemList.Block_BronzePlate.get(1, new Object[]{}), new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Bronze,4), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Stone,1)}, null, 160, 96); -// GT_Values.RA.addArcFurnaceRecipe(ItemList.Block_IridiumTungstensteel.get(1, new Object[]{}), new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Bronze,4), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Stone,1)}, null, 160, 96); GT_Values.RA.addArcFurnaceRecipe(ItemList.Block_TungstenSteelReinforced.get(1), new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.TungstenSteel,2), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Concrete,1)}, null, 160, 96); - //Temporary until circuit overhaul -// GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 1), 100, 16); - GT_Values.RA.addPrinterRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), FluidRegistry.getFluidStack("squidink", 36), GT_Values.NI, ItemList.Paper_Punch_Card_Empty.get(1L), 100, 2); GT_Values.RA.addPrinterRecipe(ItemList.Paper_Punch_Card_Empty.get(1L), FluidRegistry.getFluidStack("squidink", 36), ItemList.Tool_DataStick.getWithName(0L, "With Punch Card Data"), ItemList.Paper_Punch_Card_Encoded.get(1L), 100, 2); GT_Values.RA.addPrinterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), FluidRegistry.getFluidStack("squidink", 144), ItemList.Tool_DataStick.getWithName(0L, "With Scanned Book Data"), ItemList.Paper_Printed_Pages.get(1L), 400, 2); GT_Values.RA.addPrinterRecipe(new ItemStack(Items.map, 1, 32767), FluidRegistry.getFluidStack("squidink", 144), ItemList.Tool_DataStick.getWithName(0L, "With Scanned Map Data"), new ItemStack(Items.filled_map, 1, 0), 400, 2); GT_Values.RA.addPrinterRecipe(new ItemStack(Items.book, 1, 32767), FluidRegistry.getFluidStack("squidink", 144), GT_Values.NI, GT_Utility.getWrittenBook("Manual_Printer", ItemList.Book_Written_01.get(1L)), 400, 2); - for (OrePrefixes tPrefix : Arrays.asList(OrePrefixes.dust, OrePrefixes.dustSmall, OrePrefixes.dustTiny)) { - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Blaze, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.EnderEye, 1L * tPrefix.mMaterialAmount), (int) (100L * tPrefix.mMaterialAmount / 3628800L), 48); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Gold, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Silver, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Electrum, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Iron, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Invar, 3L * tPrefix.mMaterialAmount), (int) (300L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Iron, 4L), GT_OreDictUnificator.get(tPrefix, Materials.Invar, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Manganese, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.StainlessSteel, 9L * tPrefix.mMaterialAmount), (int) (900L * tPrefix.mMaterialAmount / 3628800L), 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Iron, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Aluminium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Kanthal, 3L * tPrefix.mMaterialAmount), (int) (300L * tPrefix.mMaterialAmount / 3628800L), 120); - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Barium, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Yttrium, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.YttriumBariumCuprate, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Zinc, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Brass, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Tin, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Bronze, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Cupronickel, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 24); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Silver, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.SterlingSilver, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Copper, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Electrum, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackBronze, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Bismuth, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Brass, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BismuthBronze, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.BlackBronze, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Steel, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackSteel, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.SterlingSilver, 1L), GT_OreDictUnificator.get(tPrefix, Materials.BismuthBronze, 1L), GT_OreDictUnificator.get(tPrefix, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(tPrefix, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.RedSteel, 8L * tPrefix.mMaterialAmount), (int) (800L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.RoseGold, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Brass, 1L), GT_OreDictUnificator.get(tPrefix, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(tPrefix, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlueSteel, 8L * tPrefix.mMaterialAmount), (int) (800L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Cobalt, 5L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Molybdenum, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Ultimet, 9L * tPrefix.mMaterialAmount), (int) (900L * tPrefix.mMaterialAmount / 3628800L), 500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Brass, 7L), GT_OreDictUnificator.get(tPrefix, Materials.Aluminium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Cobalt, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.CobaltBrass, 9L * tPrefix.mMaterialAmount), (int) (900L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Sulfur, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Coal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Sulfur, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Charcoal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Sulfur, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Carbon, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 8); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Indium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Gallium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Phosphorus, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.IndiumGalliumPhosphide, 3L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Brick, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Clay, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Fireclay, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 4L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Nichrome, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Osmium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Iridium, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Osmiridium, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Niobium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Titanium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.NiobiumTitanium, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Vanadium, 3L), GT_OreDictUnificator.get(tPrefix, Materials.Gallium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.VanadiumGallium, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Tungsten, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenCarbide, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Tungsten, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Steel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenSteel, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 500); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.TungstenSteel, 5L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Molybdenum, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Vanadium, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSG, 9L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 3500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.HSSG, 6L), GT_OreDictUnificator.get(tPrefix, Materials.Cobalt, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Manganese, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Silicon, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSE, 9L * tPrefix.mMaterialAmount), (int) (700L * tPrefix.mMaterialAmount / 3628800L), 4000); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Zinc, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Iron, 4L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.FerriteMixture, 6L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Boron, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Glass, 7L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BorosilicateGlass, 8L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); - - //InCore - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.HSSG,6L),GT_OreDictUnificator.get(tPrefix, Materials.Iridium, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Osmium, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSS, 9L * tPrefix.mMaterialAmount), (int) (800L * tPrefix.mMaterialAmount / 3628800L), 4500); - - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Naquadah, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Tritium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.NaquadahAlloy, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 8000); - - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Yttrium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Barium, 2L), GT_OreDictUnificator.get(tPrefix, Materials.AnyCopper, 3L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.YttriumBariumCuprate, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 2000); - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Aluminium, 6L), GT_OreDictUnificator.get(tPrefix, Materials.AnyCopper, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Manganese, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Magnesium, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Duralumin, 9L * tPrefix.mMaterialAmount), (int) (900L * tPrefix.mMaterialAmount / 3628800L), 2000); - } + + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.EnderEye, 1L * OrePrefixes.dust.mMaterialAmount), (int) (100L * OrePrefixes.dust.mMaterialAmount / 3628800L), 48); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Electrum, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Invar, 3L * OrePrefixes.dust.mMaterialAmount), (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.StainlessSteel, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Kanthal, 3L * OrePrefixes.dust.mMaterialAmount), (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); + //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Barium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Yttrium, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.YttriumBariumCuprate, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Brass, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Bronze, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Cupronickel, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 24); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.SterlingSilver, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackBronze, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BismuthBronze, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackSteel, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.RedSteel, 8L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlueSteel, 8L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Ultimet, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 7L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.CobaltBrass, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Charcoal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.IndiumGalliumPhosphide, 3L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brick, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Fireclay, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Nichrome, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Osmiridium, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Niobium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.NiobiumTitanium, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.VanadiumGallium, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenCarbide, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenSteel, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSG, 9L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 3500); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1),GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSE, 9L * OrePrefixes.dust.mMaterialAmount), (int) (700L * OrePrefixes.dust.mMaterialAmount / 3628800L), 4000); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.FerriteMixture, 6L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 7L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BorosilicateGlass, 8L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(new ItemStack(Items.rotten_flesh, 1, 0), new ItemStack(Items.fermented_spider_eye, 1, 0), ItemList.IC2_Scrap.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatRaw, 1L), FluidRegistry.getFluidStack("potion.purpledrink", 750), FluidRegistry.getFluidStack("sludge", 1000), ItemList.Food_Chum.get(4L), 128, 24); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, ItemList.Food_Dough.get(2L), 32, 8); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), ItemList.Food_PotatoChips.get(1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.Food_ChiliChips.get(1L), 32, 8); @@ -158,8 +142,8 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), Materials.Empty.getCells(1), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.HeavyFuel.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), Materials.Empty.getCells(5), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.LightFuel.getFluid(5000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(5), Materials.HeavyFuel.getFluid(1000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(5), 120, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(6), Materials.LightFuel.getFluid(5000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(1), 120, 120); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(5), Materials.HeavyFuel.getFluid(1000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(5), 16, 120); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(6), Materials.LightFuel.getFluid(5000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(1), 16, 120); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), GT_Values.NI, GT_Values.NI, Materials.Lubricant.getFluid(20), new FluidStack(ItemList.sDrillingFluid, 5000), Materials.Empty.getCells(5), 64, 16); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(125), FluidRegistry.getFluidStack("ic2coolant", 125), GT_Values.NI, 256, 48); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_ModHandler.getDistilledWater(1000), FluidRegistry.getFluidStack("ic2coolant", 1000), GT_Values.NI, 256, 48); @@ -417,23 +401,9 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Naquadah, 1L), Materials.Osmium.getMolten(144L), ItemList.Block_NaquadahPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 450, 256); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), Materials.Naquadria.getMolten(144L), ItemList.Block_NeutroniumPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 500, 480); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_Superconductor.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor, 1L), 200, 7000); - //Core Mod Code - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_Cupronickel.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Cupronickel, 1L), 200, 30); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_Kanthal.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Kanthal, 1L), 200, 120); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_Nichrome.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Nichrome, 1L), 200, 480); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_TungstenSteel.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 1L), 200, 1024); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_HSSG.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.HSSG, 1L), 200, 1920); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_Naquadah.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Naquadah, 1L), 200, 4096); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_NaquadahAlloy.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NaquadahAlloy, 1L), 200, 7680); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_ElectrumFlux.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.ElectrumFlux, 1L), 200, 15000); - //GT_Values.RA.addAssemblerRecipe(ItemList.Casing_Coil_AwakenedDraconium.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.DraconiumAwakened, 1L), 200, 30000); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), Materials.Concrete.getMolten(144L), ItemList.Block_TungstenSteelReinforced.get(1L), GT_Values.NI, GT_Values.NI, null, 200, 4); GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedGold, 1L), GT_Values.NI, Materials.Mercury.getFluid(200L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 2L, 14), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 9000}, 400, 120); - //GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Galena, 1L), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 10000, 7500}, 800, 8); - for (int j = 0; j < Dyes.dyeRed.getSizeOfFluidList(); j++) { GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), Dyes.dyeRed.getFluidDye(j, 72L), GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 0), GT_Values.NI, GT_Values.NI, null, 32, 16); } @@ -495,7 +465,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 10000, 500, 24); GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 10000, 500, 24); GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 10000, 500, 24); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Polybenzimidazole.getMolten(72L), GT_ModHandler.getIC2Item("carbonFiber", 128L), 10000, 300, 1920); + GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 32), Materials.Polybenzimidazole.getMolten(36L), GT_ModHandler.getIC2Item("carbonFiber", 64L), 10000, 150, 1920); GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Epoxid.getMolten(144L), GT_ModHandler.getIC2Item("carbonFiber", 64L), 10000, 300, 480); GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Polytetrafluoroethylene.getMolten(288L), GT_ModHandler.getIC2Item("carbonFiber", 32L), 10000, 400, 120); GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Plastic.getMolten(576L), GT_ModHandler.getIC2Item("carbonFiber", 16L), 10000, 600, 30); @@ -513,7 +483,13 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Elite), 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidRegulator_IV.get(1L), 200, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Master), 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidRegulator_LuV.get(1L), 150, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Ultimate), 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidRegulator_ZPM.get(1L), 100, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Superconductor), 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidRegulator_UV.get(1L), 50, 500000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.SuperconductorUHV), 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidRegulator_UV.get(1L), 50, 500000); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_LV.get(1L), ItemList.Electric_Motor_LV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Steel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_LV.get(1L), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_MV.get(1L), ItemList.Electric_Motor_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Aluminium), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_MV.get(1L), 350, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_HV.get(1L), ItemList.Electric_Motor_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.StainlessSteel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_HV.get(1L), 300, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_EV.get(1L), ItemList.Electric_Motor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Titanium), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_EV.get(1L), 250, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_IV.get(1L), ItemList.Electric_Motor_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.TungstenSteel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_IV.get(1L), 200, 7680); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), OrePrefixes.circuit.get(Materials.Good), 4, GT_Values.NF, ItemList.Schematic.get(1L), 320, 16); //GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L), OrePrefixes.circuit.get(Materials.Basic), 2, GT_Values.NF, ItemList.FluidFilter.get(1L), 800, 4);//TODO Check @@ -531,68 +507,53 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_HV.get(1L), 200, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_EV.get(1L), 200, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_IV.get(1L), 200, 7680); - - {//limiting life time of the variables - ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1); - NBTTagCompound nbtFlask = new NBTTagCompound(); - nbtFlask.setInteger("Capacity", 144); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); - nbtFlask.setInteger("Capacity", 288); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); - nbtFlask.setInteger("Capacity", 576); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); - nbtFlask.setInteger("Capacity", 720); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); - nbtFlask.setInteger("Capacity", 864); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); - nbtFlask.setInteger("Capacity", 250); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, 30); - nbtFlask.setInteger("Capacity", 500); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, 30); - // make the 1000L recipe actualy in - ItemStack flask500 = flask.copy(); - nbtFlask.setInteger("Capacity", 1000); - flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(24), flask, 10, 30); - } -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Brass, 1L), ItemList.Conveyor_Module_HV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_HV.get(1L), 200, 480); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Electrum, 1L), ItemList.Conveyor_Module_EV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_EV.get(1L), 200, 1920); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Platinum, 1L), ItemList.Conveyor_Module_IV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_IV.get(1L), 200, 7680); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Osmium, 1L), ItemList.Conveyor_Module_LuV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_LuV.get(1L), 200, 30720); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.ElectrumFlux, 1L), ItemList.Conveyor_Module_ZPM.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_ZPM.get(1L), 200, 122880); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.BlackPlutonium, 1L), ItemList.Conveyor_Module_UV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_UV.get(1L), 200, 500000); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bedrockium, 1L), ItemList.Conveyor_Module_UHV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_MAX.get(1L), 200, 2000000); - -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Brass, 1L), ItemList.Conveyor_Module_HV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_HV.get(1L), 200, 480); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Electrum, 1L), ItemList.Conveyor_Module_EV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_EV.get(1L), 200, 1920); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Platinum, 1L), ItemList.Conveyor_Module_IV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_IV.get(1L), 200, 7680); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Osmium, 1L), ItemList.Conveyor_Module_LuV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_LuV.get(1L), 200, 30720); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.ElectrumFlux, 1L), ItemList.Conveyor_Module_ZPM.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_ZPM.get(1L), 200, 122880); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.BlackPlutonium, 1L), ItemList.Conveyor_Module_UV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_UV.get(1L), 200, 500000); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bedrockium, 1L), ItemList.Conveyor_Module_UHV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_Bus_MAX.get(1L), 200, 2000000); - -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.StainlessSteel, 1L), ItemList.Electric_Pump_HV.get(1L), ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_HV.get(1L), 200, 480); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Titanium, 1L), ItemList.Electric_Pump_EV.get(1L), ItemList.Large_Fluid_Cell_Titanium.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_EV.get(1L), 200, 1920); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_IV.get(1L), 200, 7680); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Enderium, 1L), ItemList.Electric_Pump_LuV.get(1L), ItemList.Large_Fluid_Cell_Chrome.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_LuV.get(1L), 200, 30720); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 1L), ItemList.Electric_Pump_ZPM.get(1L), ItemList.Large_Fluid_Cell_Iridium.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_ZPM.get(1L), 200, 122880); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.NetherStar, 1L), ItemList.Electric_Pump_UV.get(1L), ItemList.Large_Fluid_Cell_Osmium.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_UV.get(1L), 200, 500000); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.MysteriousCrystal, 1L), ItemList.Electric_Pump_UHV.get(1L), ItemList.Large_Fluid_Cell_Neutronium.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_MAX.get(1L), 200, 2000000); - -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.StainlessSteel, 1L), ItemList.Electric_Pump_HV.get(1L), ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_HV.get(1L), 200, 480); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Titanium, 1L), ItemList.Electric_Pump_EV.get(1L), ItemList.Large_Fluid_Cell_Titanium.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_EV.get(1L), 200, 1920); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L), ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_IV.get(1L), 200, 7680); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Enderium, 1L), ItemList.Electric_Pump_LuV.get(1L), ItemList.Large_Fluid_Cell_Chrome.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_LuV.get(1L), 200, 30720); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 1L), ItemList.Electric_Pump_ZPM.get(1L), ItemList.Large_Fluid_Cell_Iridium.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_ZPM.get(1L), 200, 122880); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.NetherStar, 1L), ItemList.Electric_Pump_UV.get(1L), ItemList.Large_Fluid_Cell_Osmium.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_UV.get(1L), 200, 500000); -// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.MysteriousCrystal, 1L), ItemList.Electric_Pump_UHV.get(1L), ItemList.Large_Fluid_Cell_Neutronium.get(1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Hatch_Output_MAX.get(1L), 200, 2000000); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Fluid.get(2L), 300, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Tin, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Item.get(2L), 300, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), GT_Utility.getIntegratedCircuit(24)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(64L), 600, 24); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), GT_Utility.getIntegratedCircuit(24)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Item_Pipe.get(64L), 600, 24); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), ItemList.Robot_Arm_IV.get(2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Casing_Gearbox_TungstenSteel.get(1L), 200, 30); + + {//limiting life time of the variables + ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1); + NBTTagCompound nbtFlask = new NBTTagCompound(); + nbtFlask.setInteger("Capacity", 144); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); + nbtFlask.setInteger("Capacity", 288); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); + nbtFlask.setInteger("Capacity", 576); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); + nbtFlask.setInteger("Capacity", 720); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); + nbtFlask.setInteger("Capacity", 864); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); + nbtFlask.setInteger("Capacity", 72); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, 30); + nbtFlask.setInteger("Capacity", 648); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(7), flask, 10, 30); + nbtFlask.setInteger("Capacity", 936); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(8), flask, 10, 30); + nbtFlask.setInteger("Capacity", 250); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, 30); + nbtFlask.setInteger("Capacity", 500); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, 30); + // make the 1000L recipe actualy in + ItemStack flask500 = flask.copy(); + nbtFlask.setInteger("Capacity", 1000); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(24), flask, 10, 30); + } GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1L), ItemList.Electric_Motor_HV.get(1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_HV.get(1L), 200, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 1L), ItemList.Electric_Motor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_EV.get(1L), 200, 1920); @@ -602,10 +563,10 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NetherStar, 1L), ItemList.Electric_Motor_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_UV.get(1L), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.MysteriousCrystal, 1L), ItemList.Electric_Motor_UHV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.CosmicNeutronium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_MAX.get(1L), 200, 2000000); - //TODO CHECK RECIPES BELOW GT_Values.RA.addCentrifugeRecipe(ItemList.Cell_Empty.get(1), null, Materials.Air.getGas(10000), Materials.Nitrogen.getGas(3900), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), null, null, null, null, null, null, 1600, 8); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 3), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 1), Materials.SulfuricAcid.getFluid(4000), new FluidStack(ItemList.sIndiumConcentrate, 8000), null, 60, 150); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sIndiumConcentrate, 8000), new FluidStack(ItemList.sLeadZincSolution, 8000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Indium, 1), 50, 600); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 36), GT_Utility.getIntegratedCircuit(9), new FluidStack(ItemList.sIndiumConcentrate, 72000), new FluidStack(ItemList.sLeadZincSolution, 72000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1), 450, 600); GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, GT_Values.NI, new FluidStack(ItemList.sLeadZincSolution, 8000), Materials.Water.getFluid(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 3), null, null, null, 300, 192); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 1), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sNitricAcid, 1000), new FluidStack(ItemList.sNickelSulfate, 2000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sNitricAcid, 1000), new FluidStack(ItemList.sBlueVitriol, 2000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30); @@ -625,79 +586,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bread.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Bread.get(2L), 128, 4); GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Baguette.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Baguette.get(2L), 128, 4); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Coated.get(3), new Object[]{"RRR", "PPP", "RRR", 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1), 'R', ItemList.IC2_Resin.get(1)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Coated_Basic.get(1), new Object[]{"FFF", "FCF", "FFF", 'C', ItemList.Circuit_Board_Coated.get(1), 'F', GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 1)}); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 8), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 32), Materials.Glue.getFluid(576), ItemList.Circuit_Board_Coated_Basic.get(8), 1600, 8); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8), ItemList.Circuit_Integrated.get(0), Materials.Glue.getFluid(288), ItemList.Circuit_Board_Phenolic.get(8), 2400, 16); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Phenolic_Good.get(1), new Object[]{"FFF", "FCF", "FFF", 'C', ItemList.Circuit_Board_Phenolic.get(1), 'F', GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 1)}); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Phenolic.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 4), new FluidStack(ItemList.sIron3Chloride, 100), null, ItemList.Circuit_Board_Phenolic_Good.get(1), 600, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Epoxid, 1), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 8), Materials.SulfuricAcid.getFluid(500), null, ItemList.Circuit_Board_Epoxy.get(1), 600, 30); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Epoxy.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 8), new FluidStack(ItemList.sIron3Chloride, 500), null, ItemList.Circuit_Board_Epoxy_Advanced.get(1), 1200, 30); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 32), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 16), Materials.Electrum.getMolten(288), null, ItemList.Circuit_Board_Fiberglass.get(2), null, 1200, 480, 2600); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Fiberglass.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 16), new FluidStack(ItemList.sIron3Chloride, 1000), null, ItemList.Circuit_Board_Fiberglass_Advanced.get(1), 1800, 30, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Fiberglass.get(2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Platinum, 32), Materials.SulfuricAcid.getFluid(500), null, ItemList.Circuit_Board_Multifiberglass.get(1), 600, 480, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Multifiberglass.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 32), new FluidStack(ItemList.sIron3Chloride, 2000), null, ItemList.Circuit_Board_Multifiberglass_Elite.get(1), 2400, 120, true); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Wetware.get(1), new Object[]{"DLD", "PBP", "TPT", 'T', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1), 'L', ItemList.Electric_Pump_LV.get(1), 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 1), 'D', ItemList.Bottle_Dragon_Blood.get(1), 'B', ItemList.Circuit_Board_Multifiberglass.get(1)}); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Wetware.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 64), new FluidStack(ItemList.sIron3Chloride, 5000), null, ItemList.Circuit_Board_Wetware_Extreme.get(1), 3000, 480, true); - - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(1), new Object[]{"RPR", "FCF", " P ", 'F', OrePrefixes.wireGt01.get(Materials.Copper), 'P', OrePrefixes.wireFine.get(Materials.Copper), 'C', OrePrefixes.dust.get(Materials.Coal), 'R', ItemList.IC2_Resin.get(1)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3), new Object[]{" P ", "FCF", " P ", 'P', new ItemStack(Items.paper), 'F', OrePrefixes.wireFine.get(Materials.Copper), 'C', OrePrefixes.dust.get(Materials.Coal)}); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), Materials.Glue.getFluid(288), ItemList.Circuit_Parts_Resistor.get(4), 320, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4), Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_ResistorSMD.get(8), 320, 96, true); - //GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), ItemList.Shape_Mold_Ball.get(0), ItemList.Circuit_Parts_Glass_Tube.get(1), 240, 16); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1), new Object[]{"WWW", "FGF", "SAS", 'G', ItemList.Circuit_Parts_Glass_Tube.get(1), 'F', OrePrefixes.wireFine.get(Materials.Copper), 'W', OrePrefixes.wireGt01.get(Materials.Copper), 'S', OrePrefixes.stickLong.get(Materials.Steel), 'A', OrePrefixes.bolt.get(Materials.RedAlloy)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1), new Object[]{"PSP","FGF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'W',OrePrefixes.wireGt01.get(Materials.Copper)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',ItemList.Circuit_Silicon_Wafer.get(1),'W',OrePrefixes.wireGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',ItemList.Circuit_Silicon_Wafer.get(1),'W',OrePrefixes.wireFine.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(4), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gallium, 1),'W',OrePrefixes.wireGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(4), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gallium, 1),'W',OrePrefixes.wireFine.get(Materials.Tin)}); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 8), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.GalliumArsenide, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_Diode.get(8), 600, 30); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 4), ItemList.Circuit_Silicon_Wafer.get(1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_Diode.get(4), 600, 30); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 8), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.GalliumArsenide, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_DiodeSMD.get(16), 600, 192, true); - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Coil.get(1), new Object[]{"WWW", "WDW", "WWW", 'G', new ItemStack(Blocks.glass_pane), 'D', ItemList.IC2_Item_Casing_Steel.get(1), 'W', OrePrefixes.wireFine.get(Materials.Copper)}); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 16), Materials.Plastic.getFluid(144), ItemList.Circuit_Parts_Coil.get(4), 320, 30); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 8), Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_Transistor.get(8), 320, 30); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gallium, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 8), Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_TransistorSMD.get(16), 320, 120, true); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Plastic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 4), Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_Capacitor.get(4), 320, 120); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 4), Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_CapacitorSMD.get(8), 320, 480, true); - - //GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0, GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(1), 900, 480, true); - //GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0, GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(4), 600, 1920, true); - //GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0, GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(1), 900, 480, true); - //GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0, GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(4), 600, 1920, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_ILC.get(1), ItemList.Circuit_Chip_ILC.get(8), null, 900, 64); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_Ram.get(1), ItemList.Circuit_Chip_Ram.get(32), null, 900, 96); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NAND.get(1), ItemList.Circuit_Chip_NAND.get(32), null, 900, 192, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NOR.get(1), ItemList.Circuit_Chip_NOR.get(16), null, 900, 192, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_CPU.get(1), ItemList.Circuit_Chip_CPU.get(8), null, 900, 120, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC.get(1), ItemList.Circuit_Chip_SoC.get(6), null, 900, 480, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC2.get(1), ItemList.Circuit_Chip_SoC2.get(6), null, 900, 1024, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_PIC.get(1), ItemList.Circuit_Chip_PIC.get(4), null, 900, 1024, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_HPIC.get(1), ItemList.Circuit_Chip_HPIC.get(2), null, 900, 4096, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1), ItemList.Circuit_Chip_NanoCPU.get(7), null, 900, 480, true); - //GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_QuantumCPU.get(1), ItemList.Circuit_Chip_QuantumCPU.get(5), null, 900, 1920, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_PIC.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IndiumGalliumPhosphide, 2), Materials.RedstoneAlloy.getMolten(288), null, ItemList.Circuit_Wafer_HPIC.get(1), 1200, 1920, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_CPU.get(1), GT_Utility.copyAmount(16, ic2.core.Ic2Items.carbonFiber), Materials.Glowstone.getMolten(576), null, ItemList.Circuit_Wafer_NanoCPU.get(1), 1200, 1920, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IndiumGalliumPhosphide, 1), Materials.Radon.getGas(50), null, ItemList.Circuit_Wafer_QuantumCPU.get(1), 1200, 1920, true); - //GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1), ItemList.QuantumEye.get(2), Materials.GalliumArsenide.getMolten(288), null, ItemList.Circuit_Wafer_QuantumCPU.get(1), 900, 1920, true); - - //GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Emerald, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1), 1000, 12000, 320, true); - //GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Olivine, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1), 1000, 12000, 320, true); - //GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Emerald, 12), Materials.UUMatter.getFluid(250), ItemList.Tool_DataOrb.get(1), 10000, 12000, 960, true); - //GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Olivine, 12), Materials.UUMatter.getFluid(250), ItemList.Tool_DataOrb.get(1), 10000, 12000, 960, true); - //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(9), new Object[]{ItemList.Circuit_Chip_CrystalCPU.get(1)}); - //GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1), null, 900, 480, 5000); - //GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1), null, 900, 480, 5000); - - //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Good.get(1), new Object[]{"PAP", "CBC", "DCD", 'D', ItemList.Circuit_Parts_Diode.get(1), 'C', Ic2Items.electronicCircuit, 'A', CustomItemList.AluminiumItemCasing.get(1), 'P', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), 'B', ItemList.Circuit_Board_Phenolic_Good.get(1),}); - //Core Mod End - //OLD RECIPES - //GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1), ItemList.Circuit_Parts_Wiring_Basic.get(4L), ItemList.Circuit_Board_Basic.get(1L), 32, 16); - //GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1), ItemList.Circuit_Parts_Wiring_Advanced.get(4L), ItemList.Circuit_Board_Advanced.get(1L), 32, 64); - //GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Elite.get(1), ItemList.Circuit_Parts_Wiring_Elite.get(4L), ItemList.Circuit_Board_Elite.get(1L), 32, 256); - //GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L), 32, 64); - //GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L), 32, 64); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.Polytetrafluoroethylene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.Polystyrene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.BorosilicateGlass.getMolten(72), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); @@ -705,15 +593,10 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L), Materials.ReinforceGlass.getMolten(72), GT_ModHandler.getModItem("dreamcraft", "item.ReinforcedGlassPLate", 1L, 0),160, 1920); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.ReinforceGlass.getMolten(144), GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L), 160, 1920); - //GT_Values.RA.addChemicalRecipe(Materials.Ichorium.getNuggets(4), GT_ModHandler.getModItem("dreamcraft", "item.PrimordialPearlFragment", 1L, 0), Materials.Radon.getGas(16000L), Materials.GrowthMediumRaw.getFluid(16000L), GT_Values.NI, 300, 30720); - //GT_Values.RA.addChemicalRecipe(Materials.BlackPlutonium.getDust(4), Materials.Americium.getDust(4), Materials.Radon.getGas(2000L), Materials.GrowthMediumRaw.getFluid(2000L), GT_Values.NI, 300, 30720); - //GT_Values.RA.addChemicalRecipe(Materials.CosmicNeutronium.getDustTiny(1), Materials.InfinityCatalyst.getDustTiny(1), Materials.Radon.getGas(32000L), Materials.GrowthMediumRaw.getFluid(32000L), GT_Values.NI, 600, 122880); GT_Values.RA.addChemicalRecipe(GT_ModHandler.getModItem("GalaxySpace","item.UnknowCrystal",4L), Materials.Osmiridium.getDust(2), Materials.GrowthMediumSterilized.getFluid(1000L), FluidRegistry.getFluidStack("bacterialsludge", 1000), ItemList.Circuit_Chip_Stemcell.get(64L), GT_Values.NI,600, 30720); GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Chip_Stemcell.get(32L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CosmicNeutronium, 4), Materials.BioMediumSterilized.getFluid(2000L), FluidRegistry.getFluidStack("mutagen", 2000), ItemList.Circuit_Chip_Biocell.get(32L), GT_Values.NI,1200, 500000); - //GT_Values.RA.addMixerRecipe(Materials.MysteriousCrystal.getDust(16), Materials.Oriharukon.getDust(16), Materials.CosmicNeutronium.getDust(4), Materials.Infinity.getDustTiny(1), GT_ModHandler.getModItem("dreamcraft", "item.TCetiESeaweedExtract", 16L, 0), GT_Values.NI, Materials.GrowthMediumRaw.getFluid(4000L), Materials.BioMediumRaw.getFluid(4000L), GT_Values.NI, 300, 500000); GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.GrowthMediumRaw.getFluid(1000L), Materials.GrowthMediumSterilized.getFluid(1000L), 200, 7680); GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.BioMediumRaw.getFluid(1000L), Materials.BioMediumSterilized.getFluid(1000L), 200, 30720); - //GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), FluidRegistry.getFluidStack("potion.dragonblood", 1000), Materials.GrowthMediumSterilized.getFluid(1000), 100, 122880); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); @@ -735,76 +618,12 @@ public class GT_MachineRecipeLoader implements Runnable { for (Materials tMat : Materials.values()) { if (tMat.mStandardMoltenFluid != null && tMat.contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD))) { 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.Tin, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Tin, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 0), 200, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Primitive, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Iron, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iron, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 0), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Bronze, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Bronze, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Bronze, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 1), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Steel, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 2), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 3), 200, 30); //Circuit soldering - //Integraded Circuits //TODO CHECK THERE ARE CHANGES IN THE CIRCUIT ASSEMBLER RECIPES, DREAM adjust and comment out again i guess, MOSTLY AMOUNT CHANGES - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1),ItemList.Circuit_Chip_ILC.get(1),ItemList.Circuit_Parts_Resistor.get(2),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1), 200, 8); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1),ItemList.Circuit_Chip_ILC.get(1),ItemList.Circuit_Parts_ResistorSMD.get(2),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1), 200, 8); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1),ItemList.Circuit_Basic.get(3),ItemList.Circuit_Parts_Resistor.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1), 400, 16); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1),ItemList.Circuit_Basic.get(3),ItemList.Circuit_Parts_ResistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1), 400, 16); - - //Advanced circuit - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getIC2Item("advancedCircuit", 1L), 800, 28); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getIC2Item("advancedCircuit", 1L), 800, 28); - - //Highly Integrated Circuits - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Chip_CPU.get(1),ItemList.Circuit_Parts_Resistor.get(4),ItemList.Circuit_Parts_Capacitor.get(4),ItemList.Circuit_Parts_Transistor.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1), 200, 60); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Processor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_Capacitor.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 12)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Computer.get(1), 400, 90); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Processor.get(1),ItemList.Circuit_Chip_NAND.get(32),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 8),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 4)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataStick.get(1), 400, 90); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(2),ItemList.Circuit_Advanced.get(2),ItemList.Circuit_Parts_Diode.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Data.get(1), 400, 90); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Data.get(4),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_Capacitor.get(24),ItemList.Circuit_Chip_Ram.get(16),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1), 1600, 480); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Chip_CPU.get(1),ItemList.Circuit_Parts_ResistorSMD.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Parts_TransistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1), 200, 60); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Processor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 12)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Computer.get(1), 400, 80); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(2),ItemList.Circuit_Advanced.get(2),ItemList.Circuit_Parts_DiodeSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Data.get(1), 400, 90); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Data.get(4),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(24),ItemList.Circuit_Chip_Ram.get(16),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1), 1600, 480); - //Nanotech Circuits - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1),ItemList.Circuit_Chip_NanoCPU.get(1),ItemList.Circuit_Parts_ResistorSMD.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Parts_TransistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1), 200, 600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1),ItemList.Circuit_Nanoprocessor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Nanocomputer.get(1), 400, 600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1),ItemList.Circuit_Nanoprocessor.get(1),ItemList.Circuit_Chip_Ram.get(4),ItemList.Circuit_Chip_NOR.get(32),ItemList.Circuit_Chip_NAND.get(64),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 32)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataOrb.get(1), 400, 1200); - //NEW? //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(2),ItemList.Circuit_Nanocomputer.get(2),ItemList.Circuit_Parts_DiodeSMD.get(4),ItemList.Circuit_Chip_NOR.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Elitenanocomputer.get(1), 400, 600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Elitenanocomputer.get(4),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(24),ItemList.Circuit_Chip_Ram.get(16),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Master.get(1), 1600, 1920); - //Quantum Circuits - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Chip_QuantumCPU.get(1),ItemList.Circuit_Chip_NanoCPU.get(1),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Parts_TransistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1), 200, 2400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Quantumprocessor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Quantumcomputer.get(1), 400, 2400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(2),ItemList.Circuit_Quantumcomputer.get(2),ItemList.Circuit_Parts_DiodeSMD.get(4),ItemList.Circuit_Chip_NOR.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Masterquantumcomputer.get(1), 400, 2400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Masterquantumcomputer.get(4),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(24),ItemList.Circuit_Chip_Ram.get(16),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Quantummainframe.get(1), 1600, 7680); - //Crystallized Circuits - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Chip_CrystalCPU.get(1),ItemList.Circuit_Chip_NanoCPU.get(1),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Parts_TransistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1), 200, 9600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Crystalprocessor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Crystalcomputer.get(1), 400, 9600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(2),ItemList.Circuit_Crystalcomputer.get(2),ItemList.Circuit_Parts_DiodeSMD.get(4),ItemList.Circuit_Chip_NOR.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Ultimatecrystalcomputer.get(1), 400, 9600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Ultimatecrystalcomputer.get(4),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(24),ItemList.Circuit_Chip_Ram.get(16),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Crystalmainframe.get(1), 1600, 30720); - //Wetware Circuits - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1),ItemList.Circuit_Chip_NeuroCPU.get(1),ItemList.Circuit_Chip_CrystalCPU.get(1),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Parts_TransistorSMD.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Neuroprocessor.get(1), 200, 38400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1),ItemList.Circuit_Neuroprocessor.get(3),ItemList.Circuit_Parts_Coil.get(4),ItemList.Circuit_Parts_CapacitorSMD.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwarecomputer.get(1), 400, 38400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(2),ItemList.Circuit_Wetwarecomputer.get(2),ItemList.Circuit_Parts_DiodeSMD.get(4),ItemList.Circuit_Chip_NOR.get(4),ItemList.Circuit_Chip_Ram.get(4),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwaresupercomputer.get(1), 400, 38400); - - //SoC - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Chip_SoC.get(1),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1), 50, 600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1),ItemList.Circuit_Chip_SoC.get(1),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1), 50, 2400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1),ItemList.Circuit_Chip_SoC2.get(1),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1), 50, 9600); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1),ItemList.Circuit_Chip_SoC2.get(1),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1), 50, 38400); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Chip_CrystalSoC.get(1),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1), 50, 153600); - - //Lapoorbs - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Chip_PIC.get(4), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L),ItemList.Circuit_Chip_NanoCPU.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16)},tMat.getMolten(144L * tMultiplier), ItemList.Energy_LapotronicOrb.get(1), 512, 1024); - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1),ItemList.Circuit_Chip_HPIC.get(4), ItemList.Energy_LapotronicOrb.get(8L),ItemList.Circuit_Chip_QuantumCPU.get(1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L)},tMat.getMolten(144L * tMultiplier), ItemList.Energy_LapotronicOrb2.get(1), 1024, 4096); - - //Wetware Board - //GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 2), ItemList.Electric_Pump_IV.get(1), ItemList.Bottle_Dragon_Blood.get(4), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 16)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Board_Wetware.get(1), 600, 1920, true); - - //OLD RECIPES - //GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Steel.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 2L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L), 16, 8); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L), 16, 8); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Basic.get(1L), ItemList.Circuit_Primitive.get(2L), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Basic.get(1L), 32, 16); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Basic.get(1L), ItemList.Circuit_Basic.get(1L), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Good.get(1L), 32, 16); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L), ItemList.Circuit_Parts_Advanced.get(2L), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Advanced.get(1L), 32, 64); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Data.get(1L), 32, 64); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L), ItemList.Circuit_Data.get(3L), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Elite.get(1L), 32, 256); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Master.get(1L), 32, 256); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Data.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 2L), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Tool_DataStick.get(1L), 128, 64); + //Integraded Circuits for (ItemStack tPlate : new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L)}) { GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.lever, 1, 32767), tPlate, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_Controller.get(1L), 800, 16); @@ -831,10 +650,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("dreamcraft", "item.ArtificialLeather", 1L, 0), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L), 100, 4); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Elite.get(2L), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(18L), GT_Values.NF, ItemList.Tool_DataOrb.get(1L), 512, 256); - //GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Master.get(2L), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L), GT_Values.NF, ItemList.Energy_LapotronicOrb.get(1L), 512, 1024); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L), ItemList.Energy_LapotronicOrb.get(8L), GT_Values.NF, ItemList.Energy_LapotronicOrb2.get(1L), 2048, 4096); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), ItemList.Energy_LapotronicOrb2.get(8L), GT_Values.NF, ItemList.ZPM2.get(1L), 32768, 4096); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), 100, 8); @@ -853,11 +668,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "propolis", 5L, 2), ItemList.Circuit_Integrated.getWithDamage(0L, 5L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 1L, 1), 16, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "sturdyMachine", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 4L), Materials.Water.getFluid(5000L), ItemList.FR_Casing_Hardened.get(1L), 64, 32); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_Values.NF, ItemList.FR_Casing_Sturdy.get(1L), 32, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 6L), Materials.Water.getFluid(1000L), GT_ModHandler.getModItem(aTextForestry, "chipsets", 1L, 0), 16, 8); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 6L), Materials.Water.getFluid(1000L), GT_ModHandler.getModItem(aTextForestry, "chipsets", 1L, 1), 32, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 6L), Materials.Water.getFluid(1000L), GT_ModHandler.getModItem(aTextForestry, "chipsets", 1L, 2), 48, 24); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.WroughtIron, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 6L), Materials.Water.getFluid(1000L), GT_ModHandler.getModItem(aTextForestry, "chipsets", 1L, 2), 48, 24); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 6L), Materials.Water.getFluid(1000L), GT_ModHandler.getModItem(aTextForestry, "chipsets", 1L, 3), 64, 32); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.wool, 1, 32767), Materials.Creosote.getFluid(1000L), new ItemStack(Blocks.torch, 6, 0), 400, 1); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 5L, 1), ItemList.Circuit_Integrated.getWithDamage(0L, 5L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), 64, 8); GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.piston, 1, 32767), new ItemStack(Items.slime_ball, 1, 32767), GT_Values.NF, new ItemStack(Blocks.sticky_piston, 1, 0), 100, 4); @@ -937,19 +747,17 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addUniversalDistillationRecipe(Materials.Oil.getFluid(50L), new FluidStack[]{ Materials.SulfuricHeavyFuel.getFluid(15), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricGas.getGas(60)}, null, 20, 96); GT_Values.RA.addUniversalDistillationRecipe(Materials.OilHeavy.getFluid(100), new FluidStack[]{ Materials.SulfuricHeavyFuel.getFluid(250), Materials.SulfuricLightFuel.getFluid(45), Materials.SulfuricNaphtha.getFluid(15), Materials.SulfuricGas.getGas(60)}, null, 20, 288); - //TODO ADDED? GT_Values.RA.addUniversalDistillationRecipe(Materials.OilLight.getFluid(150), new FluidStack[]{Materials.SulfuricGas.getGas(240), Materials.SulfuricNaphtha.getFluid(30), Materials.SulfuricLightFuel.getFluid(20), Materials.SulfuricHeavyFuel.getFluid(10)}, null, 32, 64); GT_Values.RA.addUniversalDistillationRecipe(Materials.OilMedium.getFluid(100), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64); GT_Values.RA.addUniversalDistillationRecipe(Materials.Oil.getFluid(50L), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64); - if (GregTech_API.sSpecialFile.get("general", "EnableLagencyOilGalactiCraft", false) && FluidRegistry.getFluid("oilgc") != null) { + if (GregTech_API.sSpecialFile.get("general", "EnableLagencyOilGalactiCraft", false) && FluidRegistry.getFluid("oilgc") != null) GT_Values.RA.addUniversalDistillationRecipe(new FluidStack(FluidRegistry.getFluid("oilgc"), 50), new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(15), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricGas.getGas(60)}, null, 20, 96); - } + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new FluidStack(ItemList.sOilExtraHeavy,10), Materials.OilHeavy.getFluid(15), 16, 24, false); GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L), Materials.HeavyFuel.getFluid(10L), new FluidStack(ItemList.sToluene,4), 16, 24, false); GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new FluidStack(ItemList.sToluene,30), Materials.LightFuel.getFluid(30L), 16, 24, false); - GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(250), GT_Values.NF, new ItemStack(Blocks.tnt, 1), 200, 24); - + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.Glass.getMolten(144), ItemList.Circuit_Parts_Glass_Tube.get(1), 200, 24); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.ReinforceGlass.getFluid(288), ItemList.Circuit_Parts_Reinforced_Glass_Tube.get(1), 200, 240); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), FluidRegistry.getFluidStack("glass.molten", 1000), ItemList.Circuit_Parts_Glass_Tube.get(1), 200, 24); @@ -963,9 +771,11 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0L), Materials.WroughtIron.getMolten(144), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), 32, 8); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.WroughtIron.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), 288, 8); - GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 133), GT_Values.NF, ItemList.GelledToluene.get(2), 140, 192); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell,Materials.SulfuricAcid, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sNitricAcid,1000), new FluidStack(ItemList.sNitrationMixture, 2000), ItemList.Cell_Empty.get(1), 480, 2); + + GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 133), GT_Values.NF, ItemList.GelledToluene.get(2), 140, 192); + GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 1197), GT_Values.NF, ItemList.GelledToluene.get(18), 1260, 192); + GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(250), GT_Values.NF, new ItemStack(Blocks.tnt, 1), 200, 24); GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sNitrationMixture,200), Materials.DilutedSulfuricAcid.getFluid(200), GT_ModHandler.getIC2Item("industrialTnt", 1L), 80, 480); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.NatruralGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); @@ -980,6 +790,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 8L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 8L), 160); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), GT_Utility.getIntegratedCircuit(1), Materials.Naphtha.getFluid(576), Materials.Polycaprolactam.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Potassium, 1), 640); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 9L), GT_Utility.getIntegratedCircuit(9), Materials.Naphtha.getFluid(5184), Materials.Polycaprolactam.getMolten(11664), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1), 5760); GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Polycaprolactam, 1L), new ItemStack(Items.string, 32), 80, 48); //GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.RedstoneAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedstoneAlloy, 2L), 100, 4); @@ -1040,9 +851,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); - //Disabled in favor of a different type of Salt Water -// GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1L), tFluid, FluidRegistry.getFluid("potion.saltywater"), true); -// GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 1L), tFluid, FluidRegistry.getFluid("potion.saltywater"), true); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), tFluid, FluidRegistry.getFluid("potion.thick"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), tFluid, FluidRegistry.getFluid("potion.mundane"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), tFluid, FluidRegistry.getFluid("potion.mundane"), false); @@ -1140,21 +948,6 @@ public class GT_MachineRecipeLoader implements Runnable { this.addPotionRecipes("regen", new ItemStack(Items.ghast_tear, 1, 0)); this.addPotionRecipes("speed", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L)); this.addPotionRecipes("strength", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L)); - //TODO CHECK OLD RECIPES??? - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fish, 1, 3), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.waterbreathing"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.magma_cream, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.fireresistance"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.golden_carrot, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.nightvision"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.weakness"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.spider_eye, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.poison"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.speckled_melon, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.health"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.ghast_tear, 1, 0), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.regen"), false); - //GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.speed"), false); - //GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion.strength"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.spider_eye, 1, 0), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.poison.strong"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.speckled_melon, 1, 0), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.health.strong"), false); - //GT_Values.RA.addBrewingRecipe(new ItemStack(Items.ghast_tear, 1, 0), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.regen.strong"), false); - //GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.speed.strong"), false); - //GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.strength.strong"), false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("milk", 50), FluidRegistry.getFluidStack("potion.mundane", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.lemonjuice", 50), FluidRegistry.getFluidStack("potion.limoncello", 25), 1024, true); @@ -1310,47 +1103,42 @@ public class GT_MachineRecipeLoader implements Runnable { GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockSkyChest", 1L, 32767), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 45), GT_Values.NI, 0, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.blaze_rod, 1), new ItemStack(Items.blaze_powder, 3), new ItemStack(Items.blaze_powder, 1), 50, false); GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), GT_Values.NI, 0, true); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.flint, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Flint, 4L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Flint, 1L), 40, true); GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.red_mushroom, 1, 32767), ItemList.IC2_Grin_Powder.get(1L)); GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.item_frame, 1, 32767), new ItemStack(Items.leather, 1), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 4L), 95, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.bow, 1, 0), new ItemStack(Items.string, 3), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 3L), 95, false); + GT_ModHandler.addPulverisationRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1)); + GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.brick_stairs, 1, 0), Materials.Brick.getDustSmall(6)); + GT_ModHandler.addPulverisationRecipe(ItemList.CompressedFireclay.get(1), Materials.Fireclay.getDustSmall(1)); + GT_ModHandler.addPulverisationRecipe(ItemList.Firebrick.get(1), Materials.Brick.getDust(1)); + GT_ModHandler.addPulverisationRecipe(ItemList.Casing_Firebricks.get(1), Materials.Brick.getDust(4)); + GT_ModHandler.addPulverisationRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1), Materials.Brick.getDust(8), Materials.Iron.getDust(1), true); + GT_Values.RA.addPulveriserRecipe(ItemList.Conveyor_Module_LV.get(1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 4L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 2L)}, null, 1328, 4); + + GT_Values.RA.addSifterRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack[] {new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0)}, new int[] {10000, 9000, 8000, 6000, 3300, 2500}, 600, 16); + GT_Values.RA.addSifterRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 1L), new ItemStack[]{new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)}, new int[]{10000, 9000, 8000, 7000, 6000, 5000}, 600, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.gravel, 1, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack(Blocks.sand, 1, 0), 10, 16); - - GT_Values.RA.addSifterRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack[] {new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0)}, new int[] {10000, 9000, 8000, 6000, 3300, 2500}, 600, 16); - GT_Values.RA.addSifterRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 1L), new ItemStack[]{new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)}, new int[]{10000, 9000, 8000, 7000, 6000, 5000}, 600, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.sandstone, 1, 32767), new ItemStack(Blocks.sand, 1, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.packed_ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 2L), 10, 16); - //GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.hardened_clay, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), 16, 10); - //GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Items.brick, 3, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Items.netherbrick, 3, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); - GT_Values.RA.addForgeHammerRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1), 10, 16); GT_Values.RA.addForgeHammerRecipe(ItemList.Firebrick.get(1), Materials.Brick.getDust(1), 10, 16); GT_Values.RA.addForgeHammerRecipe(ItemList.Casing_Firebricks.get(1), ItemList.Firebrick.get(3), 10, 16); - - GT_ModHandler.addPulverisationRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1)); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.brick_stairs, 1, 0), Materials.Brick.getDustSmall(6)); - GT_ModHandler.addPulverisationRecipe(ItemList.CompressedFireclay.get(1), Materials.Fireclay.getDustSmall(1)); - GT_ModHandler.addPulverisationRecipe(ItemList.Firebrick.get(1), Materials.Brick.getDust(1)); - GT_ModHandler.addPulverisationRecipe(ItemList.Casing_Firebricks.get(1), Materials.Brick.getDust(4)); - GT_ModHandler.addPulverisationRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1), Materials.Brick.getDust(8), Materials.Iron.getDust(1), true); - - GT_Values.RA.addPulveriserRecipe(ItemList.Conveyor_Module_LV.get(1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 4L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicone, 6L)}, null, 1328, 4); - - GT_Values.RA.addForgeHammerRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 1), 16, 10); - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1), 50, GT_Values.NI, 0, true); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.HeeEndium, GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ingot", 1), true, true); + + if (Loader.isModLoaded("HardcoreEnderExpansion")) { + GT_Values.RA.addForgeHammerRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 1), 16, 10); + GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1), 50, GT_Values.NI, 0, true); + GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.HeeEndium, GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ingot", 1), true, true); + } GT_Values.RA.addAmplifier(ItemList.IC2_Scrap.get(9L), 180, 1); GT_Values.RA.addAmplifier(ItemList.IC2_Scrapbox.get(1L), 180, 1); @@ -1359,55 +1147,16 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBoxingRecipe(ItemList.Food_Fries.get(1L), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Food_Packaged_Fries.get(1L), 64, 16); GT_Values.RA.addBoxingRecipe(ItemList.Food_PotatoChips.get(1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), ItemList.Food_Packaged_PotatoChips.get(1L), 64, 16); GT_Values.RA.addBoxingRecipe(ItemList.Food_ChiliChips.get(1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), ItemList.Food_Packaged_ChiliChips.get(1L), 64, 16); - //TODO CHECK!!!! - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 3L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silicon, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ElectricalSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 2L), (int) Math.max(Materials.ElectricalSteel.getMass() / 40L, 1L) * Materials.ElectricalSteel.mBlastFurnaceTemp, 120, Materials.ElectricalSteel.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), Materials.Redstone.getMolten(144), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L), null, Materials.EnergeticAlloy.mBlastFurnaceTemp / 10, 120, Materials.EnergeticAlloy.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.PhasedGold, 1L), null, Materials.VibrantAlloy.mBlastFurnaceTemp / 10, 480, Materials.VibrantAlloy.mBlastFurnaceTemp); - ////GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silicon, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.RedstoneAlloy, 1L), 400, 24); - ////GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ConductiveIron, 1L), 400, 24); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.PhasedIron, 1L), null, Materials.PulsatingIron.mBlastFurnaceTemp / 10, 120, Materials.PulsatingIron.mBlastFurnaceTemp); - ////GT_Values.RA.addAlloySmelterRecipe(new ItemStack(Blocks.soul_sand), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Soularium, 1L), 400, 24); - - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TungstenSteel, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), (int) Math.max(Materials.TungstenSteel.getMass() / 80L, 1L) * Materials.TungstenSteel.mBlastFurnaceTemp, 480, Materials.TungstenSteel.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TungstenCarbide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Ash, 2L), (int) Math.max(Materials.TungstenCarbide.getMass() / 40L, 1L) * Materials.TungstenCarbide.mBlastFurnaceTemp, 480, Materials.TungstenCarbide.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Vanadium, 3L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gallium, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.VanadiumGallium, 4L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 2L), (int) Math.max(Materials.VanadiumGallium.getMass() / 40L, 1L) * Materials.VanadiumGallium.mBlastFurnaceTemp, 480, Materials.VanadiumGallium.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Niobium, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.NiobiumTitanium, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), (int) Math.max(Materials.NiobiumTitanium.getMass() / 80L, 1L) * Materials.NiobiumTitanium.mBlastFurnaceTemp, 480, Materials.NiobiumTitanium.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 4L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Chrome, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Nichrome, 5L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 2L), (int) Math.max(Materials.Nichrome.getMass() / 32L, 1L) * Materials.Nichrome.mBlastFurnaceTemp, 480, Materials.Nichrome.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ruby, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L), 400, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L), 320, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GreenSapphire, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L), 400, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L), 320, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sapphire, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_Values.NI, 400, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), GT_Values.NI, 320, 100, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ilmenite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 4L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 4L), 800, 500, 1700); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ilmenite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 4L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 4L), 800, 500, 1700); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), GT_Values.NI, Materials.Titaniumtetrachloride.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesiumchloride, 2L), 800, 480, Materials.Titanium.mBlastFurnaceTemp + 200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Galena, 1L), GT_Values.NI, Materials.Oxygen.getGas(2000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Silver, 4L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Lead, 4L), 400, 500, 1500); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Galena, 1L), GT_Values.NI, Materials.Oxygen.getGas(2000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Silver, 5L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Lead, 5L), 320, 500, 1500); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnetite, 1L), GT_Values.NI, Materials.Oxygen.getGas(2000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 4L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 400, 500, 1000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Magnetite, 1L), GT_Values.NI, Materials.Oxygen.getGas(2000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 5L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Ash, 1L), 320, 500, 1000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 500, 120, 1000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.PigIron, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 100, 120, 1000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.WroughtIron, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 100, 120, 1000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ShadowIron, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ShadowSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 500, 120, 1100); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.MeteoricIron, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.MeteoricSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L), 500, 120, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.AnnealedCopper, 1L), GT_Values.NI, 500, 120, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_Values.NI, Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.AnnealedCopper, 1L), GT_Values.NI, 500, 120, 1200); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ElectricalSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DarkSteel, 1L), GT_Values.NI, 4000, 120, 2000); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 3L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 1L), Materials.Helium.getGas(1000), null, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Osmiridium, 4L), null, 500, 1920, 2900); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmiridium, 1L), Materials.Argon.getGas(1000), null, GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.NaquadahAlloy, 2L), null, 500, 30720, Materials.NaquadahAlloy.mBlastFurnaceTemp); - //GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Arsenic, 1L), null, null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.GalliumArsenide, 2L), null, 600, 120, Materials.GalliumArsenide.mBlastFurnaceTemp); //fuel rod canner recipes - if (!GregTech_API.mIC2Classic) { - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1, 1), null, 16, 64); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getIC2Item("TritiumCell", 1), GT_ModHandler.getIC2Item("fuelRod", 1), Materials.Tritium.getGas(32), 10000, 16, 64); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 3), ItemList.ThoriumCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 3), ItemList.NaquadahCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 3), ItemList.MNqCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ItemList.Uraniumcell_1.get(1), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ItemList.Moxcell_1.get(1), null, 30, 16); - } + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1, 1), null, 16, 64); + GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getIC2Item("TritiumCell", 1), GT_ModHandler.getIC2Item("fuelRod", 1), Materials.Tritium.getGas(32), 10000, 16, 64); + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 3), ItemList.ThoriumCell_1.get(1L), null, 30, 16); + GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 3), ItemList.NaquadahCell_1.get(1L), null, 30, 16); + GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 3), ItemList.MNqCell_1.get(1L), null, 30, 16); + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ItemList.Uraniumcell_1.get(1), null, 30, 16); + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ItemList.Moxcell_1.get(1), null, 30, 16); + //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 @@ -1462,21 +1211,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addImplosionRecipe(ItemList.Ingot_IridiumAlloy.get(1L), 8, GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)); if (Loader.isModLoaded("GalacticraftMars")) { - //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L), 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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy2.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" BB", "hPC", " BB", 'B', OrePrefixes.bolt.get(Materials.Tungsten), 'C', OrePrefixes.compressed.get(Materials.MeteoricIron), 'P', GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy3.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" BB", "hPC", " BB", 'B', OrePrefixes.bolt.get(Materials.TungstenSteel), 'C', OrePrefixes.compressed.get(Materials.Desh), 'P', GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3)}); - //-->Duplicates x3 - ////GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy1.get(1L), 8, GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 2L)); - ////GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy2.get(1L), 8, GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 2L)); - ////GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy3.get(1L), 8, GT_ModHandler.getModItem("GalacticraftMars", "item.itemBasicAsteroids", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.TungstenSteel, 2L)); - - //GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("GalacticraftCore", "tile.moonBlock", 1L, 5), null, null, Materials.Helium_3.getGas(33), new ItemStack(Blocks.sand,1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1), new int[]{5000,400,400,100,100,100}, 400, 8); - //GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem("GalacticraftCore", "tile.moonBlock", 1L, 4), new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore", "tile.moonBlock", 1L, 5)}, null, 400, 2); - //GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.mars", 1L, 9), new ItemStack(Blocks.stone, 1), Materials.Iron.getMolten(50), 10000, 250, 16); - //GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 1), new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 0)}, null, 400, 2); - //GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 2), new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 0)}, null, 400, 2); - //GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 0), null, null, Materials.Nitrogen.getGas(33), new ItemStack(Blocks.sand,1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1), new int[]{5000,400,400,100,100,100}, 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Steel, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.StainlessSteel.getMolten(72L), ItemList.Ingot_Heavy1.get(1L), 300, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), GT_Utility.getIntegratedCircuit(1)}, Materials.TungstenSteel.getMolten(72L), ItemList.Ingot_Heavy2.get(1L), 300, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), GT_Utility.getIntegratedCircuit(1)}, Materials.Platinum.getMolten(72L), ItemList.Ingot_Heavy3.get(1L), 300, 7680); @@ -1516,8 +1250,8 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFuel(GT_ModHandler.getModItem("TaintedMagic", "FluxShard", 1L), null, 720, 5); GT_Values.RA.addFuel(GT_ModHandler.getModItem("TaintedMagic", "EldritchShard", 1L), null, 720, 5); GT_Values.RA.addFuel(GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 6), null, 720, 5); - GT_Values.RA.addFuel(GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 7), null, 720, 5); - + GT_Values.RA.addFuel(GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 7), null, 720, 5); + GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(1), ItemList.Cell_Empty.get(1L), Materials.Water.getFluid(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(2), ItemList.Cell_Empty.get(1L), GT_ModHandler.getDistilledWater(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(3), ItemList.Cell_Empty.get(2L), Materials.Water.getFluid(3000L), Materials.Oxygen.getGas(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); @@ -1532,6 +1266,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 100, 64); GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sphalerite, 2), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gallium, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 2500, 0, 0, 0},200, 30); + GT_Values.RA.addElectrolyzerRecipe(ItemList.IC2_Fertilizer.get(1L), GT_Values.NI, GT_Values.NF, Materials.Water.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 100, 30); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), 500); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), 500); @@ -1551,7 +1286,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), Materials.Glass.getMolten(864L), GT_Values.NF, GT_ModHandler.getModItem("Railcraft", "tile.railcraft.glass", 6L), 50); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Carbon, 2L), Materials.Chlorine.getGas(4000L), Materials.Titaniumtetrachloride.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 2L), 500, 480); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 2L), Materials.Chlorine.getGas(4000L), Materials.Titaniumtetrachloride.getFluid(1000L), GT_Values.NI, 500, 480); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesiumchloride, 2L), GT_Values.NF, Materials.Chlorine.getGas(3000L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Magnesium, 8L), 300, 240); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesiumchloride, 2L), GT_Values.NF, Materials.Chlorine.getGas(3000L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), 300, 240); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_Values.NF, Materials.Rubber.getMolten(1296L), GT_Values.NI, 600, 16); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Sulfur, 1L), GT_Values.NF, Materials.Rubber.getMolten(144L), GT_Values.NI, 100, 16); @@ -1563,6 +1298,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), new ItemStack(Items.slime_ball, 1, 32767), new ItemStack(Items.magma_cream, 1, 0), 50); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 8), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1), Materials.Air.getGas(1000), Materials.Radon.getGas(100), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 8), 12000, 8); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{Materials.Air.getGas(8000L)}, new FluidStack[]{Materials.Radon.getGas(800L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 64L)}, 3000, 480); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1), Materials.Radon.getGas(250), ItemList.QuantumEye.get(1L), null, null, null, 480, 384); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), Materials.Radon.getGas(1250), ItemList.QuantumStar.get(1L), null, null, null, 1920, 384); GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(ItemList.QuantumStar.get(1L)), Materials.Neutronium.getMolten(288), ItemList.Gravistar.get(1L), 10000, 480, 7680); @@ -1590,9 +1326,8 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 12L), ItemList.RC_Rebar.get(48L), 2400, 15); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 8L), ItemList.RC_Rebar.get(64L), 2400, 15); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.SteelMagnetic, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); + GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 12L), ItemList.Cell_Empty.get(12L), 1200, 8); + GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 12L), ItemList.Cell_Empty.get(48L), 1200, 8); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 12L), new ItemStack(Items.bucket, 4, 0), 800, 4); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 12L), new ItemStack(Items.bucket, 4, 0), 800, 4); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Iron, 2L), GT_ModHandler.getIC2Item("fuelRod", 1L), 100, 8); @@ -1658,19 +1393,9 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.quartz_block, 1, 32767), new ItemStack(Blocks.stone_slab, 2, 7), GT_Values.NI, 25, 8); GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.glowstone, 1, 0), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Glowstone, 4L), GT_Values.NI, 100, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.IC2_Item_Casing_Iron.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.IC2_Item_Casing_Iron.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), ItemList.IC2_Item_Casing_Gold.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 1L), ItemList.IC2_Item_Casing_Bronze.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 1L), ItemList.IC2_Item_Casing_Copper.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnnealedCopper, 1L), ItemList.IC2_Item_Casing_Copper.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 1L), ItemList.IC2_Item_Casing_Tin.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lead, 1L), ItemList.IC2_Item_Casing_Lead.get(2L), GT_Values.NI, 50, 16); - //GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), ItemList.IC2_Item_Casing_Steel.get(2L), GT_Values.NI, 50, 16); for (byte i = 0; i < 16; i = (byte) (i + 1)) { GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Blocks.carpet, 2, i), GT_Values.NI, 50, 8); } - //GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 0), new ItemStack(Blocks.wooden_pressure_plate, 2, 0), GT_Values.NI, 50, 8); GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 0), ItemList.Plank_Oak.get(2L), GT_Values.NI, 50, 8); GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 1), ItemList.Plank_Spruce.get(2L), GT_Values.NI, 50, 8); GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 2), ItemList.Plank_Birch.get(2L), GT_Values.NI, 50, 8); @@ -1790,14 +1515,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_UV.get(1L), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_MAX.get(1L), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Invar, 1L), ItemList.Casing_HeatProof.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Cupronickel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_Cupronickel.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Kanthal, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_Kanthal.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Nichrome, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_Nichrome.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.TungstenSteel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_TungstenSteel.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.HSSG, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_HSSG.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Naquadah, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_Naquadah.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NaquadahAlloy, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_NaquadahAlloy.get(1L), 50, 16); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), ItemList.Casing_Coil_Superconductor.get(1L), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), ItemList.Casing_SolidSteel.get(1L), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1L), ItemList.Casing_FrostProof.get(1L), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), ItemList.Casing_RobustTungstenSteel.get(1L), 50, 16); @@ -1875,7 +1592,6 @@ public class GT_MachineRecipeLoader implements Runnable { } GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonFiber", 2L), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), GT_ModHandler.getIC2Item("carbonMesh", 1L), 800, 2); - GT_Values.RA.addAssemblerRecipe(ItemList.NC_SensorCard.getWildcard(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), GT_ModHandler.getIC2Item("itemPartCircuit", 3L), 1600, 2); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 4L), GT_ModHandler.getIC2Item("generator", 1L), GT_ModHandler.getIC2Item("waterMill", 2L), 6400, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 5L), new ItemStack(Blocks.chest, 1, 32767), new ItemStack(Blocks.hopper), 800, 2); @@ -1889,8 +1605,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), new ItemStack(Items.blaze_powder, 1, 0), new ItemStack(Items.ender_eye, 1, 0), 400, 2); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 6L), new ItemStack(Items.blaze_rod, 1, 0), new ItemStack(Items.ender_eye, 6, 0), 2500, 2); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CobaltBrass, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), ItemList.Component_Sawblade_Diamond.get(1L), 1600, 2); -// GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Flint, 5L), new ItemStack(Blocks.tnt, 3, 32767), GT_ModHandler.getIC2Item("industrialTnt", 5L), 800, 2); -// GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 4L), new ItemStack(Blocks.sand, 4, 32767), new ItemStack(Blocks.tnt, 1), 400, 1); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), new ItemStack(Blocks.redstone_lamp, 1), 400, 1); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.redstone_torch, 1), 400, 1); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 4L), new ItemStack(Items.compass, 1), 400, 4); @@ -1902,7 +1616,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 8L), new ItemStack(Items.flint, 1), ItemList.IC2_Compressed_Coal_Ball.get(1L), 400, 4); if(Loader.isModLoaded("IC2NuclearControl")) { - GT_Values.RA.addAssemblerRecipe(ItemList.NC_SensorCard.get(1L), GT_Values.NI, GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); + GT_Values.RA.addAssemblerRecipe(ItemList.NC_SensorCard.get(1L), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), GT_ModHandler.getIC2Item("electronicCircuit", 3L), 200, 30); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 0), GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 0), GT_ModHandler.getIC2Item("electronicCircuit", 1L), 200, 30); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 1), GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 1), GT_ModHandler.getIC2Item("electronicCircuit", 1L), 200, 30); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 2), GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 2), GT_ModHandler.getIC2Item("electronicCircuit", 1L), 200, 30); @@ -1964,7 +1678,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Uraniumcell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.Uraniumcell_4.get(1L), 200, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.Moxcell_2.get(1L), 200, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.Moxcell_4.get(1L), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.Moxcell_4.get(1L), 200, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.Moxcell_4.get(1L), 200, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.NaquadahCell_2.get(1L), 100, 400); GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.NaquadahCell_4.get(1L), 150, 400); GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.NaquadahCell_4.get(1L), 100, 400); @@ -2068,7 +1782,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Hydrogen.getGas(160L), Materials.Deuterium.getGas(40L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 20); GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Deuterium.getGas(160L), Materials.Tritium.getGas(40L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 80); GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Helium.getGas(80L), Materials.Helium_3.getGas(5L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 80); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Redstone, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Gold, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 488, 80); + GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 2L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 976, 80); GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1L), GT_Values.NI, GT_Values.NF, Materials.Helium.getGas(120L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Tungstate, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Platinum, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{1250, 625, 9000, 0, 0, 0}, 320, 20); GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1L), GT_Values.NI, GT_Values.NI, new int[]{5625, 9900, 5625, 625, 0, 0}, 160, 20); GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.soul_sand, 1), GT_Values.NI, GT_Values.NF, Materials.Oil.getFluid(80L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Saltpeter, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{8000, 2000, 9000, 0, 0, 0}, 200, 80); @@ -2085,32 +1799,11 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lapis, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_Values.NI, GT_ModHandler.getMaceratorRecipeList(), GT_ModHandler.getModItem("IC2", "itemBiochaff", 1L)); + GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.cactus, 8, 0), GT_ModHandler.getCompressorRecipeList(), GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); GT_Utility.removeSimpleIC2MachineRecipe(GT_ModHandler.getModItem("ExtraTrees", "food", 8L, 24), GT_ModHandler.getCompressorRecipeList(), GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); - /*if(GregTech_API.mMagneticraft && GT_Mod.gregtechproxy.mMagneticraftRecipes){ - GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Magneticraft", "item.ingotCarbide", 8)); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 8), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.WroughtIron, 1), GT_ModHandler.getModItem("Magneticraft", "item.ingotCarbide", 1), 600, 24); - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 8), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenCarbide, 1), null, null, GT_ModHandler.getModItem("Magneticraft", "item.ingotCarbide", 8), null, 100, 120, 2600); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.chunks", 1, 4)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.pebbles", 1, 4)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.rubble", 1, 4)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.chunks", 1, 13)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.pebbles", 1, 13)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.rubble", 1, 13)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.chunks", 1, 15)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.pebbles", 1, 15)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.rubble", 1, 15)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.chunks", 1, 16)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.pebbles", 1, 16)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.rubble", 1, 16)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.chunks", 1, 21)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.pebbles", 1, 21)); - GT_ModHandler.removeFurnaceSmelting(GT_ModHandler.getModItem("Magneticraft", "item.rubble", 1, 21)); - }*/ - for (MaterialStack[] tMats : mAlloySmelterList) { ItemStack tDust1 = GT_OreDictUnificator.get(OrePrefixes.dust, tMats[0].mMaterial, tMats[0].mAmount); ItemStack tDust2 = GT_OreDictUnificator.get(OrePrefixes.dust, tMats[1].mMaterial, tMats[1].mAmount); @@ -2251,13 +1944,9 @@ public class GT_MachineRecipeLoader implements Runnable { this.addProcess(tCrop, Materials.Beryllium, 100, false); this.addRecipesApril2017ChemistryUpdate(); - //if (!GT_Mod.gregtechproxy.mDisableOldChemicalRecipes) { - // addOldChemicalRecipes(); - //} else { - GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(1), 60); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); - //} + GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(1), 60); + GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); + GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Water.getFluid(200L), Materials.Quartzite.getGems(1), 750, 2000, 24); GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), GT_ModHandler.getDistilledWater(100L), Materials.Quartzite.getGems(1), 1000, 1500, 24); GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Void.getMolten(36L), Materials.Quartzite.getGems(1), 10000, 1000, 24); @@ -2307,13 +1996,7 @@ public class GT_MachineRecipeLoader implements Runnable { } } - private void run3(){//TODO CHECK assline recipes - //LUV Palladium Plat, VanadiumGallium, topazes alduorite, chrome Naquadah - //ZPM iridium niobiumTitanium jade vinteum amethyst infused gold vulcanite Ceruclase mithril Naquadah Alloy - //UV osmium Deep Iron, Shadow Iron Orihalcum rubracium draconium Electrum Flux - //UHV/(UV emmiter/sensor/forcefield) Neutronium Europium lots of (niobium yttrium gallium) adamantium draconium Yellow/red Garnets - meh - //(UHV emmiter/sensor/forcefield) also use Black Plutonium Crysolite Realgar Yellow/red Garnets - good quality - + private void run3(){ //recipe len: //LUV 6 72000 600 32k //ZPM 9 144000 1200 125k @@ -2323,8 +2006,7 @@ public class GT_MachineRecipeLoader implements Runnable { //addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); -// Motor - + //Motors GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Motor_IV.get(1, new Object(){}),144000,new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 2L), @@ -2362,19 +2044,13 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(1296), Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Motor_UV.get(1), 600, 100000); -// Pump - //LUV Palladium Plat, VanadiumGallium, topazes alduorite, chrome Naquadah - //ZPM iridium niobiumTitanium jade vinteum amethyst infused gold vulcanite Ceruclase mithril Naquadah Alloy - //UV osmium Deep Iron, Shadow Iron Orihalcum rubracium draconium Electrum Flux - //UHV/(UV emmiter/sensor/forcefield) Neutronium Europium lots of (niobium yttrium gallium) adamantium draconium Yellow/red Garnets - meh - //(UHV emmiter/sensor/forcefield) also use Black Plutonium Crysolite Realgar Yellow/red Garnets - good quality - + //Pumps GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Pump_IV.get(1, new Object(){}),144000,new Object[]{ ItemList.Electric_Motor_LuV.get(1, new Object(){}), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.NiobiumTitanium, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.HSSS, 8L), - new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.StyreneButadieneRubber), 4L), GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.Silicone), 4L)}, + 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[]{ Materials.SolderingAlloy.getMolten(144), @@ -2385,7 +2061,7 @@ public class GT_MachineRecipeLoader implements Runnable { 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 ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.StyreneButadieneRubber), 8L), GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.Silicone), 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[]{ Materials.SolderingAlloy.getMolten(288), @@ -2396,48 +2072,46 @@ public class GT_MachineRecipeLoader implements Runnable { 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 ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.StyreneButadieneRubber), 16L), GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.Silicone), 16L)}, + 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), Materials.SolderingAlloy.getMolten(1296), Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Pump_UV.get(1), 600, 100000); -// Conveyor - + //Conveyors GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_IV.get(1, new Object(){}),144000,new Object[]{ ItemList.Electric_Motor_LuV.get(2, new Object(){}), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.HSSS, 4L), GT_OreDictUnificator.get(OrePrefixes.round, Materials.HSSS, 32L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L)}, new FluidStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L), + new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 10L},}, new FluidStack[]{ Materials.SolderingAlloy.getMolten(144), - Materials.Lubricant.getFluid(250), - Materials.StyreneButadieneRubber.getMolten(1440)},ItemList.Conveyor_Module_LuV.get(1), 600, 6000); + Materials.Lubricant.getFluid(250)},ItemList.Conveyor_Module_LuV.get(1), 600, 6000); - GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_LuV.get(1, new Object(){}),144000,new ItemStack[]{ + 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 FluidStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L), + new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 20L},}, new FluidStack[]{ Materials.SolderingAlloy.getMolten(288), - Materials.Lubricant.getFluid(750), - Materials.StyreneButadieneRubber.getMolten(2880)}, ItemList.Conveyor_Module_ZPM.get(1), 600, 24000); + Materials.Lubricant.getFluid(750)}, ItemList.Conveyor_Module_ZPM.get(1), 600, 24000); - GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_ZPM.get(1, new Object(){}),288000,new ItemStack[]{ + 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 FluidStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L), + new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 40L}}, new FluidStack[]{ Materials.Naquadria.getMolten(1296), Materials.SolderingAlloy.getMolten(1296), - Materials.Lubricant.getFluid(2000), - Materials.StyreneButadieneRubber.getMolten(5760)}, ItemList.Conveyor_Module_UV.get(1), 600, 100000); - -// Piston + Materials.Lubricant.getFluid(2000)}, ItemList.Conveyor_Module_UV.get(1), 600, 100000); + //Pistons GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Piston_IV.get(1, new Object(){}),144000,new ItemStack[]{ ItemList.Electric_Motor_LuV.get(1, new Object(){}), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), @@ -2476,8 +2150,7 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(1296), Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Piston_UV.get(1), 600, 100000); - // RobotArm - + //RobotArms GT_Values.RA.addAssemblylineRecipe(ItemList.Robot_Arm_IV.get(1, new Object(){}),144000,new Object[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 4L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.HSSS, 1L), @@ -2518,13 +2191,7 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(2304), Materials.Lubricant.getFluid(2000)}, ItemList.Robot_Arm_UV.get(1), 600, 100000); -// Emitter - //LUV Palladium Plat, VanadiumGallium, topazes alduorite, chrome Naquadah - //ZPM iridium niobiumTitanium jade vinteum amethyst infused gold vulcanite Ceruclase mithril Naquadah Alloy - //UV osmium Deep Iron, Shadow Iron Orihalcum rubracium draconium Electrum Flux - //UHV/(UV emmiter/sensor/forcefield) Neutronium Europium lots of (niobium yttrium gallium) adamantium draconium Yellow/red Garnets - meh - //(UHV emmiter/sensor/forcefield) also use Black Plutonium Crysolite Realgar Yellow/red Garnets - good quality - + //Emitters GT_Values.RA.addAssemblylineRecipe(ItemList.Emitter_IV.get(1, new Object(){}),144000,new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), ItemList.Electric_Motor_LuV.get(1, new Object(){}), @@ -2565,8 +2232,7 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(2304)}, ItemList.Emitter_UV.get(1), 600, 100000); -// Sensor - + //Sensors GT_Values.RA.addAssemblylineRecipe(ItemList.Sensor_IV.get(1, new Object(){}),144000,new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), ItemList.Electric_Motor_LuV.get(1, new Object(){}), @@ -2607,8 +2273,7 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(2304)}, ItemList.Sensor_UV.get(1), 600, 100000); -// Field Generator - + //Field Generators GT_Values.RA.addAssemblylineRecipe(ItemList.Field_Generator_IV.get(1, new Object(){}),144000,new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), @@ -2917,7 +2582,7 @@ public class GT_MachineRecipeLoader implements Runnable { tKey = "GT_CRYSTALLISATION"; GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Sometimes when processing your Crystal Shards they become a pile of Dust instead of the mostly required Shard.<BR><BR>You have finally found a way to reverse this Process by using Vitreus Essentia for recrystallising the Shards."); GregTech_API.sThaumcraftCompat.addResearch(tKey, "Shard Recrystallisation", "Fixing your precious crystals", new String[]{"ALCHEMICALMANUFACTURE"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), 3, 0, -11, -3, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - //GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.Amber), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Amber, 1L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.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), Arrays.asList(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), Arrays.asList(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), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), @@ -2944,10 +2609,10 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_LV.get(1L), new ItemStack[]{ new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), + 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.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), ItemList.Sensor_MV.get(2L) }, @@ -2976,11 +2641,11 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_MV.get(1L), new ItemStack[]{ new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + 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.Data, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 1L), + 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), @@ -3008,11 +2673,11 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_HV.get(1L), new ItemStack[]{ new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), + 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.Elite, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.TungstenSteel, 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), @@ -3041,7 +2706,7 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_LV.get(1L), new ItemStack[]{ ItemList.MagicEnergyConverter_LV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), ItemList.Sensor_MV.get(2L) }, @@ -3093,11 +2758,11 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_HV.get(1L), new ItemStack[]{ ItemList.MagicEnergyConverter_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), - GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 16), + 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.Elite, 1L), - GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 16) + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), }, ItemList.MagicEnergyAbsorber_HV.get(1L), 8, @@ -3113,11 +2778,13 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Hull_EV.get(1L), new ItemStack[]{ ItemList.MagicEnergyConverter_HV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 1L), - GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 16), + 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.Master, 1L), - GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 16) + 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, @@ -3153,8 +2820,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addUniversalDistillationRecipe(Materials.DilutedHydrochloricAcid.getFluid(2000), new FluidStack[]{Materials.Water.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000)}, GT_Values.NI, 600, 64); - GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), Materials.Oxygen.getCells(3), Materials.Nitrogen.getGas(1000), GT_Values.NF, Materials.Saltpeter.getDust(1), Materials.Empty.getCells(3), 180); - GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), Materials.Nitrogen.getCells(1), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.Saltpeter.getDust(1), Materials.Empty.getCells(1), 180); + GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.NitricAcid.getFluid(1000), GT_Values.NF, Materials.Saltpeter.getDust(1), 100, 30); GT_Values.RA.addMixerRecipe(Materials.Salt.getDust(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000), Materials.SaltWater.getFluid(2000), GT_Values.NI, 40, 8); GT_Values.RA.addDistilleryRecipe(1, Materials.SaltWater.getFluid(2000), GT_ModHandler.getDistilledWater(1000), Materials.Salt.getDust(1), 3200, 16, false); @@ -3163,11 +2829,9 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), GT_Values.NI, 240, 16); GT_Values.RA.addMixerRecipe(Materials.Calcium.getDust(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), GT_Values.NI, 80, 16); GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDust(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), GT_Values.NI, 80, 16); - GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDustSmall(4), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), GT_Values.NI, 80, 16); GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(1), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, Materials.CalciumAcetateSolution.getCells(1), 240, 16); GT_Values.RA.addMixerRecipe(Materials.Calcium.getDust(1), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, Materials.CalciumAcetateSolution.getCells(1), 80, 16); GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDust(1), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, Materials.CalciumAcetateSolution.getCells(1), 80, 16); - GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDustSmall(4), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, Materials.CalciumAcetateSolution.getCells(1), 80, 16); //GameRegistry.addSmelting(Materials.CalciumAcetateSolution.getCells(1), Materials.Acetone.getCells(1), 0); GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.CalciumAcetateSolution.getFluid(1000), Materials.Acetone.getFluid(1000), 80, 30); GT_Values.RA.addUniversalDistillationRecipe(Materials.CalciumAcetateSolution.getFluid(1000), new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000)}, Materials.Quicklime.getDustSmall(3), 80, 480); @@ -3189,6 +2853,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addMixerRecipe(Materials.MethylAcetate.getCells(3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.PolyvinylAcetate.getFluid(2000), Materials.Glue.getFluid(5000), Materials.Empty.getCells(3), 100, 8); GT_Values.RA.addMixerRecipe(Materials.PolyvinylAcetate.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.MethylAcetate.getFluid(3000), Materials.Glue.getFluid(5000), Materials.Empty.getCells(2), 100, 8); + //CO and CO2 recipes GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), GT_Values.NI, 40, 8); GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); @@ -3201,6 +2866,15 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), Materials.Ash.getDustTiny(1), 40, 8); GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), Materials.CarbonMonoxide.getGas(2000), GT_Values.NI, 800); + GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(1), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); + GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(1), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); + GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(1), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); + GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(1), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); + GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(1), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); + GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(1), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); + GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(1), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); + GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(1), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); + GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(4000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(1), 120, 96); GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(4), GT_Utility.getIntegratedCircuit(1), Materials.CarbonMonoxide.getGas(1000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(4), 120, 96); GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(4000), GT_Values.NF, Materials.Methanol.getCells(1), 120, 96); @@ -3318,7 +2992,8 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addDistilleryRecipe(2, Materials.HeavyFuel.getFluid(100), Materials.Benzene.getFluid(40), 160, 24, false); GT_Values.RA.addDistilleryRecipe(3, Materials.HeavyFuel.getFluid(100), Materials.Phenol.getFluid(25), 160, 24, false); - GT_Values.RA.addChemicalRecipe(Materials.Apatite.getDust(1), Materials.SulfuricAcid.getCells(5), Materials.Water.getFluid(10000), Materials.PhosphoricAcid.getFluid(3000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(4), 320); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Apatite.getDust(1), Materials.SulfuricAcid.getCells(5), Materials.Water.getFluid(10000), Materials.PhosphoricAcid.getFluid(3000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(4), 320, 30); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Apatite.getDust(1)}, 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(5)}, 320, 30); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Phosphorus.getDust(4), GT_Values.NI, Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.PhosphorousPentoxide.getDust(1), GT_Values.NI, 40, 30); GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Phosphorus.getDust(4), GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Oxygen.getGas(10000)}, null, new ItemStack[]{Materials.PhosphorousPentoxide.getDust(1)}, 40, 30); GT_Values.RA.addChemicalRecipe(Materials.PhosphorousPentoxide.getDust(1), GT_Values.NI, Materials.Water.getFluid(6000), Materials.PhosphoricAcid.getFluid(4000), GT_Values.NI, 40); @@ -3338,7 +3013,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Acetone.getCells(1), Materials.Phenol.getCells(2), Materials.HydrochloricAcid.getFluid(1000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(2), 160, 30); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.HydrochloricAcid.getCells(1), Materials.Acetone.getCells(1), Materials.Phenol.getFluid(2000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(1), 160, 30); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Phenol.getCells(2), Materials.HydrochloricAcid.getCells(1), Materials.Acetone.getFluid(1000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(2), 160, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(1000)}, new FluidStack[]{Materials.BisphenolA.getFluid(1000)}, null, 160, 30); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(1000)}, new FluidStack[]{Materials.BisphenolA.getFluid(1000), Materials.Water.getFluid(1000)}, null, 160, 30); GT_Values.RA.addChemicalRecipe(Materials.BisphenolA.getCells(1), Materials.SodiumHydroxide.getDust(1), Materials.Epichlorohydrin.getFluid(1000), Materials.Epoxid.getMolten(1000), Materials.SaltWater.getCells(1), 200); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Epichlorohydrin.getCells(1), Materials.BisphenolA.getFluid(1000), Materials.Epoxid.getMolten(1000), Materials.SaltWater.getCells(1), 200); @@ -3477,8 +3152,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.HydricSulfide.getGas(2000), GT_Values.NF, Materials.Sulfur.getDust(3), Materials.Empty.getCells(1), 120); GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(2), GT_Utility.getIntegratedCircuit(2), Materials.SulfurDioxide.getGas(1000), GT_Values.NF, Materials.Sulfur.getDust(3), Materials.Empty.getCells(2), 120); - //GT_Values.RA.addChemicalRecipe(Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(3), Materials.Oxygen.getGas(3000), Materials.SulfurTrioxide.getGas(1000), GT_Values.NI, 280); - //GT_Values.RA.addChemicalRecipe(Materials.Sulfur.getDust(1), Materials.Empty.getCells(1), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.SulfurTrioxide.getCells(1), 280); GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SulfurDioxide.getGas(1000), Materials.SulfurTrioxide.getGas(1000), Materials.Empty.getCells(1), 200); GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.SulfurTrioxide.getGas(1000), Materials.Empty.getCells(1), 200); GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SulfurDioxide.getGas(1000), GT_Values.NF, Materials.SulfurTrioxide.getCells(1), 200); @@ -3524,7 +3197,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.NitricAcid.getCells(8), Materials.Empty.getCells(1), Materials.Ethenone.getGas(1000), Materials.Tetranitromethane.getFluid(2000), Materials.Water.getCells(9), 480, 120); GT_Values.RA.addChemicalRecipe(Materials.Ethenone.getCells(1), Materials.NitricAcid.getCells(8), GT_Values.NF, Materials.Tetranitromethane.getFluid(2000), Materials.Water.getCells(9), 480, 120); - //GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Tetranitromethane.getFluid(20), Materials.NitroFuel.getFluid(1000), Materials.Empty.getCells(1), 80, 8); GT_Values.RA.addMixerRecipe(Materials.Fuel.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Tetranitromethane.getFluid(20), Materials.NitroFuel.getFluid(1000), Materials.Empty.getCells(1), 20, 480); GT_Values.RA.addMixerRecipe(Materials.BioDiesel.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Tetranitromethane.getFluid(40), Materials.NitroFuel.getFluid(750), Materials.Empty.getCells(1), 20, 480); @@ -3544,22 +3216,19 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Isoprene.getFluid(1728), Materials.Air.getGas(6000), Materials.Titaniumtetrachloride.getFluid(80)}, null, new ItemStack[]{Materials.RawRubber.getDust(18)}, 640, 30); GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Isoprene.getFluid(1728), Materials.Oxygen.getGas(6000), Materials.Titaniumtetrachloride.getFluid(80)}, null, new ItemStack[]{Materials.RawRubber.getDust(24)}, 640, 30); - //GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ethylene.getGas(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); - //GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); - //GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Empty.getCells(1), Materials.Ethylene.getGas(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - //GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.Empty.getCells(1), Materials.Benzene.getFluid(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - - //GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Ethylene.getGas(1000)}, new FluidStack[]{Materials.Hydrogen.getGas(2000), Materials.Styrene.getFluid(1000)}, null,120, 30); - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Styrene.mFluid, Materials.Styrene.getCells(1), Materials.Polystyrene.mStandardMoltenFluid); + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ethylene.getGas(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); + GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Empty.getCells(1), Materials.Ethylene.getGas(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); + GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.Empty.getCells(1), Materials.Benzene.getFluid(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), ItemList.Cell_Air.get(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(9), Materials.Empty.getCells(6), 160, 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), Materials.Oxygen.getCells(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(13), Materials.Empty.getCells(6), 160, 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), ItemList.Cell_Air.get(15), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(16), 480, 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Oxygen.getCells(15), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(16), 480, 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Air.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(4), 480, 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Oxygen.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(4), 480, 240); - //GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Ethylene.getGas(1000), Materials.Benzene.getFluid(1000)}, new FluidStack[]{Materials.Styrene.getFluid(1000), Materials.Hydrogen.getGas(2000)}, null,120, 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)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(1)}, 160, 240); GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Styrene.getFluid(72), Materials.Butadiene.getGas(216), Materials.Oxygen.getGas(2000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(3)}, 160, 240); GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, new FluidStack[]{Materials.Styrene.getFluid(540), Materials.Butadiene.getGas(1620), Materials.Titaniumtetrachloride.getFluid(100), Materials.Air.getGas(15000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(22), Materials.RawStyreneButadieneRubber.getDustSmall(2)}, 640, 240); @@ -3578,23 +3247,34 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.Salt.getDust(2), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.SodiumBisulfate.getDust(1), 60); GT_Values.RA.addElectrolyzerRecipe(Materials.SodiumBisulfate.getDust(2), Materials.Empty.getCells(2), null, Materials.SodiumPersulfate.getFluid(1000), Materials.Hydrogen.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 600, 30); + //Biodiesel recipes GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Methanol.getCells(1), Materials.SeedOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.SeedOil.getCells(6), Materials.Methanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Methanol.getCells(1), Materials.FishOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.FishOil.getCells(6), Materials.Methanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Ethanol.getCells(1), Materials.SeedOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.SeedOil.getCells(6), Materials.Ethanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Ethanol.getCells(1), Materials.FishOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.FishOil.getCells(6), Materials.Ethanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); + + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Methanol.getCells(9), Materials.SeedOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.SeedOil.getCells(54), Materials.Methanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Methanol.getCells(9), Materials.FishOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.FishOil.getCells(54), Materials.Methanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Ethanol.getCells(9), Materials.SeedOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.SeedOil.getCells(54), Materials.Ethanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Ethanol.getCells(9), Materials.FishOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); + GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.FishOil.getCells(54), Materials.Ethanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); + + GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitrationMixture.getFluid(3000), Materials.DilutedSulfuricAcid.getFluid(3000), Materials.Glyceryl.getCells(1), 180); GT_Values.RA.addChemicalRecipe( Materials.NitrationMixture.getCells(3), GT_Utility.getIntegratedCircuit(1), Materials.Glycerol.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(3000), Materials.Glyceryl.getCells(1), Materials.Empty.getCells(2), 180); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Glycerol.getCells(1), Materials.Empty.getCells(2), Materials.NitrationMixture.getFluid(3000), Materials.Glyceryl.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(3), GT_Values.NI, 180, 30); GT_Values.RA.addChemicalRecipe( Materials.NitrationMixture.getCells(3), GT_Utility.getIntegratedCircuit(11), Materials.Glycerol.getFluid(1000), Materials.Glyceryl.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(3), 180); - GT_Values.RA.addChemicalRecipe(Materials.Quicklime.getDust(1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Calcite.getDust(1), 80); - GT_Values.RA.addChemicalRecipe(Materials.Calcite.getDust(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Quicklime.getDust(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Quicklime.getDust(2), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Calcite.getDust(5), 80); + GT_Values.RA.addChemicalRecipe(Materials.Calcite.getDust(5), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Quicklime.getDust(2), 240); GT_Values.RA.addChemicalRecipe(Materials.Magnesia.getDust(1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Magnesite.getDust(1), 80); GT_Values.RA.addChemicalRecipe(Materials.Magnesite.getDust(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Magnesia.getDust(1), 240); @@ -3629,46 +3309,7 @@ public class GT_MachineRecipeLoader implements Runnable { } - //private void addOldChemicalRecipes() { - //GT_Values.RA.setIsAddingDeprecatedRecipes(true); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), ItemList.Circuit_Integrated.getWithDamage(0, 1), Materials.Oxygen.getGas(2000L), Materials.NitrogenDioxide.getGas(1000L), ItemList.Cell_Empty.get(1L), GT_Values.NI,1250, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 2L), ItemList.Circuit_Integrated.getWithDamage(0, 1), Materials.Nitrogen.getGas(1000L), Materials.NitrogenDioxide.getGas(1000L), ItemList.Cell_Empty.get(2L), GT_Values.NI,1250, 30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), Materials.Water.getFluid(1000L), Materials.SulfuricAcid.getFluid(1000L), GT_Values.NI, GT_Values.NI, 1150, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), Materials.Oxygen.getGas(4000L), Materials.SulfuricAcid.getFluid(1000L), ItemList.Cell_Empty.get(2L), GT_Values.NI, 1150,30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 4L), Materials.Hydrogen.getGas(2000L), Materials.SulfuricAcid.getFluid(1000L), ItemList.Cell_Empty.get(4L), GT_Values.NI, 1150,30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), ItemList.Cell_Water.get(2), null, Materials.SulfuricAcid.getFluid(2000), ItemList.Cell_Empty.get(4), GT_Values.NI, 320, 30); - //GT_Values.RA.addChemicalRecipe(ItemList.Cell_Water.get(2), null, new FluidStack(ItemList.sHydricSulfur, 2000), Materials.SulfuricAcid.getFluid(2000), ItemList.Cell_Empty.get(2), GT_Values.NI, 320, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), null, Materials.Water.getFluid(2000), Materials.SulfuricAcid.getFluid(2000), ItemList.Cell_Empty.get(2), GT_Values.NI, 320, 30); - - //GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(2), null, Materials.Naphtha.getFluid(288), Materials.Plastic.getMolten(144), ItemList.Cell_Empty.get(2), GT_Values.NI, 640, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 16L), Materials.Naphtha.getFluid(1296), Materials.Plastic.getMolten(1296), ItemList.Cell_Empty.get(16), GT_Values.NI, 640,30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 3L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), new FluidStack(ItemList.sEpichlorhydrin, 144), Materials.Epoxid.getMolten(288), ItemList.Cell_Empty.get(4), GT_Values.NI, 240, 30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 1L), Materials.LPG.getFluid(432), new FluidStack(ItemList.sEpichlorhydrin, 432), ItemList.Cell_Empty.get(1), GT_Values.NI, 480, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 3L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fluorine, 1L), new FluidStack(ItemList.sEpichlorhydrin, 432), Materials.Polytetrafluoroethylene.getMolten(432), ItemList.Cell_Empty.get(4), GT_Values.NI, 240, 256); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), null, new FluidStack(ItemList.sEpichlorhydrin, 144), Materials.Silicone.getMolten(144), GT_Values.NI, GT_Values.NI, 240, 96); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 3L), Materials.Air.getGas(500), new FluidStack(ItemList.sRocketFuel,3000), ItemList.Cell_Water.get(4), GT_Values.NI, 1000, 388); - - //GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Gas.getGas(8000), Materials.LPG.getFluid(4000), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000}, 200, 5); - //GT_Values.RA.addCentrifugeRecipe(ItemList.Cell_Empty.get(4), GT_Values.NI, Materials.Gas.getGas(8000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LPG, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000}, 200, 5); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), GT_Values.NI, Materials.Glyceryl.getFluid(250L), Materials.NitroFuel.getFluid(1000L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 250, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), GT_Values.NI, Materials.Fuel.getFluid(4000L), Materials.NitroFuel.getFluid(4000L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 1000, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 1L), GT_Values.NI, Materials.Glyceryl.getFluid(250L), Materials.NitroFuel.getFluid(1250L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 250, 30); - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), GT_Values.NI, Materials.LightFuel.getFluid(4000L), Materials.NitroFuel.getFluid(5000L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 1000, 30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Oxygen.getGas(4000L), Materials.SodiumPersulfate.getFluid(6000L), GT_Values.NI, GT_Values.NI, 800, 30); - //GT_Values.RA.addMixerRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(2), null, null, null, Materials.SodiumSulfide.getDust(1), 60, 30); - - //GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), Materials.Water.getFluid(2000L), Materials.Glyceryl.getFluid(4000L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 2700, 30); - //GT_Values.RA.setIsAddingDeprecatedRecipes(false); - //} - - private void addRecipesMay2017OilRefining() { + private void addRecipesMay2017OilRefining() { GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getGas(1000), new FluidStack[]{Materials.Butane.getGas(60), Materials.Propane.getGas(70), Materials.Ethane.getGas(100), Materials.Methane.getGas(750), Materials.Helium.getGas(20)}, GT_Values.NI, 240, 120); GT_Values.RA.addCentrifugeRecipe(null, null, Materials.Propane.getGas(320), Materials.LPG.getFluid(290), null, null, null, null, null, null, null, 20, 5); @@ -3871,6 +3512,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.ChromiumDioxide.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.ChromiumTrioxide.getDust(1), GT_Values.NI,100, 60); //Potassium Dichromate + GT_Values.RA.addChemicalRecipe(Materials.Saltpeter.getDust(2), Materials.ChromiumTrioxide.getDust(2), Materials.Potassiumdichromate.getDust(1), 100, 480); GT_Values.RA.addChemicalRecipe(Materials.PotassiumNitrade.getDust(2), Materials.ChromiumTrioxide.getDust(2), Materials.Potassiumdichromate.getDust(1), 100, 480); //Nitrochlorobenzene @@ -3885,15 +3527,18 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Benzene.getFluid(1000), GT_Values.NF,Materials.Dimethylbenzene.getCells(1), 4000, 120); GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Methane.getGas(1000), GT_Values.NF, Materials.Dimethylbenzene.getCells(1), 4000, 120); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Methane.getGas(1000)}, new FluidStack[]{Materials.Dimethylbenzene.getFluid(1000L)}, null, 4000, 120); //Phthalic Acid - GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(1), Materials.Potassiumdichromate.getDustTiny(1), Materials.Oxygen.getGas(2000), Materials.Water.getFluid(2000),Materials.PhthalicAcid.getCells(1), 100, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(1), Materials.Potassiumdichromate.getDustTiny(1),Materials.Oxygen.getGas(2000), Materials.PhthalicAcid.getFluid(1000),Materials.Water.getCells(2), 100, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), Materials.Potassiumdichromate.getDustTiny(1),Materials.Dimethylbenzene.getFluid(1000), Materials.Water.getFluid(2000),Materials.PhthalicAcid.getCells(1), ItemList.Cell_Empty.get(1L),100, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), Materials.Potassiumdichromate.getDustTiny(1),Materials.Dimethylbenzene.getFluid(1000), Materials.PhthalicAcid.getFluid(1000),Materials.Water.getCells(2), 100, 1920); + GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(1), Materials.Potassiumdichromate.getDustTiny(1), Materials.Oxygen.getGas(2000), Materials.Water.getFluid(2000), Materials.PhthalicAcid.getCells(1), 100, 1920); + GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), Materials.Potassiumdichromate.getDustTiny(1), Materials.Dimethylbenzene.getFluid(1000), Materials.Water.getFluid(2000), Materials.PhthalicAcid.getCells(1), ItemList.Cell_Empty.get(1L),100, 1920); + GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(9), Materials.Potassiumdichromate.getDust(1), Materials.Oxygen.getGas(18000), Materials.Water.getFluid(18000), Materials.PhthalicAcid.getCells(9), 900, 1920); + GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(18), Materials.Potassiumdichromate.getDust(1), Materials.Dimethylbenzene.getFluid(9000), Materials.Water.getFluid(18000), Materials.PhthalicAcid.getCells(9), ItemList.Cell_Empty.get(1L), 900, 1920); + //Dichlorobenzidine GT_Values.RA.addChemicalRecipe(Materials.Copper.getDustTiny(1), GT_Utility.getIntegratedCircuit(1), Materials.Nitrochlorobenzene.getFluid(1000), Materials.Dichlorobenzidine.getFluid(1000), null, 200, 1920); + GT_Values.RA.addChemicalRecipe(Materials.Copper.getDust(1), GT_Utility.getIntegratedCircuit(9), Materials.Nitrochlorobenzene.getFluid(9000), Materials.Dichlorobenzidine.getFluid(9000), null, 1800, 1920); //Diphenyl Isophthalate GT_Values.RA.addChemicalRecipe(Materials.PhthalicAcid.getCells(1),Materials.SulfuricAcid.getCells(1),Materials.Phenol.getFluid(2000), Materials.DilutedSulfuricAcid.getFluid(1000),Materials.Diphenylisophthalate.getCells(1), ItemList.Cell_Empty.get(1L),100, 7680); diff --git a/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java b/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java index a8c8eb745e..c84f22ba04 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java +++ b/src/main/java/gregtech/loaders/postload/GT_MinableRegistrator.java @@ -4,8 +4,8 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import net.minecraft.init.Blocks; -public class GT_MinableRegistrator - implements Runnable { +public class GT_MinableRegistrator implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Adding Blocks to the Miners Valuable List."); GT_ModHandler.addValuableOre(Blocks.glowstone, 0, 1); diff --git a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java index 55d5d909d4..57a65268be 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java @@ -141,4 +141,4 @@ public class GT_ProcessingArrayRecipeLoader { GT_ProcessingArray_Manager.registerRecipeMapForMeta(i, aMap); } } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java index 68ce7f42d5..18a453d61c 100644 --- a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java @@ -11,12 +11,13 @@ 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."); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "easymobgrinderrecycling", true)) { GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.arrow, 1, 0)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.bone, 1, 0)); - GT_ModHandler.addToRecyclerBlackList(ItemList.Dye_Bonemeal.get(1L, new Object[0])); + GT_ModHandler.addToRecyclerBlackList(ItemList.Dye_Bonemeal.get(1L)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.rotten_flesh, 1, 0)); @@ -31,7 +32,7 @@ public class GT_RecyclerBlacklistLoader ItemStack tStack = new ItemStack(Blocks.cobblestone, 1, 0); while (tStack != null) { GT_ModHandler.addToRecyclerBlackList(tStack); - tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack}); + tStack = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack); } GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.gravel, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.flint, 1, 32767)); @@ -40,17 +41,17 @@ public class GT_RecyclerBlacklistLoader GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.stone_stairs, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.stone_brick_stairs, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getSmeltingOutput(new ItemStack(Blocks.stone, 1, 0), false, null)); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(Blocks.glass, 1, 0), null, null, new ItemStack(Blocks.glass, 1, 0)})); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(Blocks.stone, 1, 0), null, null, new ItemStack(Blocks.stone, 1, 0)})); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(Blocks.cobblestone, 1, 0), null, null, new ItemStack(Blocks.cobblestone, 1, 0)})); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack[]{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[]{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[]{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[]{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[]{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[]{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[]{new ItemStack(Blocks.glass, 1, 0)})); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.glass, 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))); } } } diff --git a/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java b/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java index dfa9971e29..842cfd3a77 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ScrapboxDropLoader.java @@ -11,8 +11,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_ScrapboxDropLoader - implements Runnable { +public class GT_ScrapboxDropLoader implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: (re-)adding Scrapbox Drops."); @@ -37,11 +37,11 @@ public class GT_ScrapboxDropLoader GT_ModHandler.addScrapboxDrop(0.5F, new ItemStack(Items.apple)); GT_ModHandler.addScrapboxDrop(0.5F, new ItemStack(Items.bread)); GT_ModHandler.addScrapboxDrop(0.1F, new ItemStack(Items.cake)); - GT_ModHandler.addScrapboxDrop(1.0F, ItemList.IC2_Food_Can_Filled.get(1L, new Object[0])); - GT_ModHandler.addScrapboxDrop(2.0F, ItemList.IC2_Food_Can_Spoiled.get(1L, new Object[0])); + GT_ModHandler.addScrapboxDrop(1.0F, ItemList.IC2_Food_Can_Filled.get(1L)); + GT_ModHandler.addScrapboxDrop(2.0F, ItemList.IC2_Food_Can_Spoiled.get(1L)); GT_ModHandler.addScrapboxDrop(0.2F, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L)); GT_ModHandler.addScrapboxDrop(1.0F, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L)); - GT_ModHandler.addScrapboxDrop(2.0F, ItemList.Cell_Empty.get(1L, new Object[0])); + GT_ModHandler.addScrapboxDrop(2.0F, ItemList.Cell_Empty.get(1L)); GT_ModHandler.addScrapboxDrop(5.0F, GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L)); GT_ModHandler.addScrapboxDrop(1.0F, new ItemStack(Items.leather)); GT_ModHandler.addScrapboxDrop(1.0F, new ItemStack(Items.feather)); @@ -50,11 +50,11 @@ public class GT_ScrapboxDropLoader GT_ModHandler.addScrapboxDrop(0.6F, new ItemStack(Items.slime_ball)); GT_ModHandler.addScrapboxDrop(0.8F, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L)); GT_ModHandler.addScrapboxDrop(2.7F, GT_ModHandler.getIC2Item("suBattery", 1L)); - GT_ModHandler.addScrapboxDrop(3.6F, ItemList.Circuit_Primitive.get(1L, new Object[0])); - GT_ModHandler.addScrapboxDrop(0.8F, ItemList.Circuit_Parts_Advanced.get(1L, new Object[0])); - GT_ModHandler.addScrapboxDrop(1.8F, ItemList.Circuit_Board_Basic.get(1L, new Object[0])); - GT_ModHandler.addScrapboxDrop(0.4F, ItemList.Circuit_Board_Advanced.get(1L, new Object[0])); - GT_ModHandler.addScrapboxDrop(0.2F, ItemList.Circuit_Board_Elite.get(1L, new Object[0])); + GT_ModHandler.addScrapboxDrop(3.6F, ItemList.Circuit_Primitive.get(1L)); + GT_ModHandler.addScrapboxDrop(0.8F, ItemList.Circuit_Parts_Advanced.get(1L)); + GT_ModHandler.addScrapboxDrop(1.8F, ItemList.Circuit_Board_Basic.get(1L)); + GT_ModHandler.addScrapboxDrop(0.4F, ItemList.Circuit_Board_Advanced.get(1L)); + GT_ModHandler.addScrapboxDrop(0.2F, ItemList.Circuit_Board_Elite.get(1L)); if (!GT_Mod.gregtechproxy.mDisableIC2Cables) { GT_ModHandler.addScrapboxDrop(2.0F, GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L)); GT_ModHandler.addScrapboxDrop(0.4F, GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L)); diff --git a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java index b154f538f8..efb3bcc0a1 100644 --- a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java @@ -1,7 +1,7 @@ package gregtech.loaders.postload; -public class GT_UUMRecipeLoader - implements Runnable { +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 0f8a3322c8..95e9db8310 100644 --- a/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java +++ b/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java @@ -95,15 +95,13 @@ public class GT_Worldgenloader implements Runnable { new GT_Worldgen_GT_Ore_SmallPieces("ore.small.garnetred", true, 5, 35, 2, false, false, false, false, true, true, Materials.GarnetRed); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.garnetyellow", true, 5, 35, 2, false, false, false, false, true, true, Materials.GarnetYellow); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.redstone", true, 5, 25, 8, true, true, false, true, true, true, Materials.Redstone); - //new GT_Worldgen_GT_Ore_SmallPieces("ore.small.platinum", true, 20, 80, 8, false, false, true, false, true, true, Materials.Platinum); - //new GT_Worldgen_GT_Ore_SmallPieces("ore.small.iridium", true, 20, 40, 8, false, false, false, false, true, true, Materials.Iridium); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.netherquartz", true, 30, 120, 64, false, true, false, false, false, false, Materials.NetherQuartz); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.saltpeter", true, 10, 60, 8, false, true, false, false, false, false, Materials.Saltpeter); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.sulfur", true, 5, 60, 40, false, true, false, false, false, false, Materials.Sulfur); //TODO: GTNH Custom Small Ores - //new GT_Worldgen_GT_Ore_SmallPieces("ore.small.osmium",true,10,30,8,false, false, false, Materials.Osmium); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.titanium",true,10,180,32,false, false, false, Materials.Titanium); + new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tungsten",true,10,120,16,false, false, false, Materials.Tungsten); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.meteoriciron",true,50,70,8,false, false, false, Materials.MeteoricIron); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.firestone",true,5,15,2,false, false, false, Materials.Firestone); new GT_Worldgen_GT_Ore_SmallPieces("ore.small.neutronium",true,5,15,8,false, false, false, Materials.Neutronium); @@ -202,27 +200,12 @@ public class GT_Worldgenloader implements Runnable { new GT_Worldgen_GT_Ore_Layer("ore.mix.richnuclear", true, 65, 120, 5, 2, 8, false, false, false, Materials.Uranium, Materials.Plutonium, Materials.Thorium, Materials.Thorium); new GT_Worldgen_GT_Ore_Layer("ore.mix.heavypentele", true, 40, 60, 60, 5, 32, false, false, false, Materials.Arsenic, Materials.Bismuth, Materials.Antimony, Materials.Antimony); new GT_Worldgen_GT_Ore_Layer("ore.mix.europa", true, 55, 65, 110, 4, 24, false, false, false, Materials.Magnesite, Materials.BandedIron, Materials.Sulfur, Materials.Opal); - new GT_Worldgen_GT_Ore_Layer("ore.mix.europacore", true, 5, 15, 5, 2, 16, false, false, false, Materials.Chrome, Materials.Tungsten, Materials.Molybdenum, Materials.Manganese); + new GT_Worldgen_GT_Ore_Layer("ore.mix.europacore", true, 5, 15, 5, 2, 16, false, false, false, Materials.Chrome, Materials.Tungstate, Materials.Molybdenum, Materials.Manganese); new GT_Worldgen_GT_Ore_Layer("ore.mix.secondlanthanid", true, 10, 40, 10, 3, 24, false, false, false, Materials.Samarium, Materials.Neodymium, Materials.Tartarite, Materials.Tartarite); new GT_Worldgen_GT_Ore_Layer("ore.mix.quartzspace", true, 40, 80, 20, 3, 16, false, false, false, Materials.Quartzite, Materials.Barite, Materials.CertusQuartz, Materials.CertusQuartz); new GT_Worldgen_GT_Ore_Layer("ore.mix.rutile", true, 5, 20, 8, 4, 12, false, false, false, Materials.Rutile, Materials.Titanium, Materials.Bauxite, Materials.MeteoricIron); new GT_Worldgen_GT_Ore_Layer("ore.mix.TFgalena", true, 5, 35, 40, 4, 16, false, false, false, Materials.Galena, Materials.Galena, Materials.Silver, Materials.Lead); new GT_Worldgen_GT_Ore_Layer("ore.mix.luvtantalite", true, 20, 30, 10, 4, 16, false, false, false, Materials.Pyrolusite, Materials.Apatite, Materials.Tantalite, Materials.Pyrochlore); - - /* - - Config Files - disabled - - int i = 0; - for (int j = GregTech_API.sWorldgenFile.get("worldgen", "AmountOfCustomLargeVeinSlots", 16); i < j; i++) { - new GT_Worldgen_GT_Ore_Layer("ore.mix.custom." + (i < 10 ? "0" : "") + i, false, 0, 0, 0, 0, 0, false, false, false, Materials._NULL, Materials._NULL, Materials._NULL, Materials._NULL); - } - - i = 0; - for (int j = GregTech_API.sWorldgenFile.get("worldgen", "AmountOfCustomSmallOreSlots", 16); i < j; i++) { - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.custom." + (i < 10 ? "0" : "") + i, false, 0, 0, 0, false, false, false, Materials._NULL); - } - */ //DO NOT DELETE V THIS V - this is needed so that gregtech generates its Ore Layer's first (the ones up there), which can then be transformed into "GT_Worldgen_GT_Ore_Layer_Space". Also Reflexion is slow. try { @@ -233,80 +216,13 @@ public class GT_Worldgenloader implements Runnable { GT_Log.out.println("Started Galactic Greg ore gen code"); //this function calls Galactic Greg and enables its generation. } catch (Exception e) { - GT_Log.err.println("Unable to start Galactic Greg ore gen code"); - e.printStackTrace(GT_Log.err); + // ClassNotFound is expected if Galactic Greg is absent, so only report if other problem + if (!(e instanceof ClassNotFoundException)) { + GT_Log.err.println("Unable to start Galactic Greg ore gen code"); + e.printStackTrace(GT_Log.err); + } } //DO NOT DELETE ^ THIS ^ - /*if (GregTech_API.mImmersiveEngineering && GT_Mod.gregtechproxy.mImmersiveEngineeringRecipes) { - blusunrize.immersiveengineering.api.tool.ExcavatorHandler.recalculateChances(true); - }*/ - -//TODO: OLD DEEP DARK VEINS DO NOT ENABLE IF VOID MINER IS THERE! - -// new GT_Worldgen_GT_Ore_Layer("ore.mix.naquadriagiant", true, 5, 15, 100, 10, 32, false, false, false, Materials.Naquadria, Materials.Naquadah, Materials.Naquadria, Materials.Naquadah); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.enrichednaquadahgiant", true, 10, 20, 100, 10, 32, false, false, false, Materials.NaquadahEnriched, Materials.Neutronium, Materials.NaquadahEnriched, Materials.Neutronium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.aerterragiant", true, 15, 25, 100, 10, 32, false, false, false, Materials.InfusedAir, Materials.InfusedEarth, Materials.InfusedAir, Materials.InfusedEarth); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.aquaodrogiant", true, 20, 30, 100, 10, 32, false, false, false, Materials.InfusedOrder, Materials.InfusedWater, Materials.InfusedOrder, Materials.InfusedWater); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.ignisperditiogiant", true, 25, 35, 100, 10, 32, false, false, false, Materials.InfusedFire, Materials.InfusedEntropy, Materials.InfusedFire, Materials.InfusedEntropy); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.osmiumiridiumgiant", true, 30, 40, 100, 10, 32, false, false, false, Materials.Osmium, Materials.Iridium, Materials.Osmium, Materials.Iridium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.infinitycatalystgiant", true, 35, 45, 100, 10, 32, false, false, false, Materials.InfinityCatalyst, Materials.BlackPlutonium, Materials.InfinityCatalyst, Materials.BlackPlutonium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.palladiumgiant", true, 40, 50, 100, 10, 32, false, false, false, Materials.Palladium, Materials.Platinum, Materials.Palladium, Materials.Platinum); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.infusedgoldgiant", true, 45, 55, 100, 10, 32, false, false, false, Materials.InfusedGold, Materials.Cooperite, Materials.InfusedGold, Materials.Cooperite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.ironsgiant", true, 50, 60, 100, 10, 32, false, false, false, Materials.DeepIron, Materials.ShadowIron, Materials.DeepIron, Materials.ShadowIron); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.uraniumgiant", true, 55, 65, 100, 10, 32, false, false, false, Materials.Uranium, Materials.Thorium, Materials.Uranium, Materials.Thorium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.pu244u238giant", true, 60, 70, 100, 10, 32, false, false, false, Materials.Plutonium, Materials.Uranium, Materials.Plutonium, Materials.Uranium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.pu241u235giant", true, 65, 75, 100, 10, 32, false, false, false, Materials.Plutonium241, Materials.Uranium235, Materials.Plutonium241, Materials.Uranium235); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.chromegiant", true, 70, 80, 100, 10, 32, false, false, false, Materials.Chrome, Materials.Vanadium, Materials.Chrome, Materials.Vanadium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.antimonygiant", true, 140, 150, 100, 10, 32, false, false, false, Materials.Stibnite, Materials.Tantalite, Materials.Stibnite, Materials.Tantalite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.tungstengiant", true, 145, 155, 100, 10, 32, false, false, false, Materials.Tungstate, Materials.Tungsten, Materials.Tungstate, Materials.Tungsten); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.powelitelitiumgiant", true, 150, 160, 100, 10, 32, false, false, false, Materials.Powellite, Materials.Lithium, Materials.Powellite, Materials.Lithium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.adamantiumaluminiumgiant", true, 155, 165, 100, 10, 32, false, false, false, Materials.Adamantium, Materials.Aluminium, Materials.Adamantium, Materials.Aluminium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.molybdengiant", true, 160, 170, 100, 10, 32, false, false, false, Materials.Molybdenite, Materials.Molybdenum, Materials.Molybdenite, Materials.Molybdenum); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.chrometitangiant", true, 165, 175, 100, 10, 32, false, false, false, Materials.Chromite, Materials.Titanium, Materials.Chromite, Materials.Titanium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.uvarovitegiant", true, 170, 180, 100, 10, 32, false, false, false, Materials.Uvarovite, Materials.Perlite, Materials.Uvarovite, Materials.Perlite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.zinctitangiant", true, 175, 185, 100, 10, 32, false, false, false, Materials.Sphalerite, Materials.Ilmenite, Materials.Sphalerite, Materials.Ilmenite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.rubynickelgiant", true, 180, 190, 100, 10, 32, false, false, false, Materials.Ruby, Materials.Pentlandite, Materials.Ruby, Materials.Pentlandite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.nickelcobaldgiant", true, 185, 195, 100, 10, 32, false, false, false, Materials.Garnierite, Materials.Cobaltite, Materials.Garnierite, Materials.Cobaltite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.pyropealmandinegiant", true, 190, 200, 100, 10, 32, false, false, false, Materials.Pyrope, Materials.Almandine, Materials.Pyrope, Materials.Almandine); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.diamondgiant", true, 195, 205, 100, 10, 32, false, false, false, Materials.Diamond, Materials.Bentonite, Materials.Diamond, Materials.Bentonite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.sapphiregiant", true, 200, 210, 100, 10, 32, false, false, false, Materials.Sapphire, Materials.GreenSapphire, Materials.Sapphire, Materials.GreenSapphire); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.certusquartzgiant", true, 205, 215, 100, 10, 32, false, false, false, Materials.CertusQuartz, Materials.Quartzite, Materials.CertusQuartz, Materials.Quartzite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.olivinegiant", true, 210, 220, 100, 10, 32, false, false, false, Materials.Magnesite, Materials.Olivine, Materials.Magnesite, Materials.Olivine); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.silvergiant", true, 215, 225, 100, 10, 32, false, false, false, Materials.Silver, Materials.Galena, Materials.Silver, Materials.Galena); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.pbmeteoricirongiant", true, 220, 230, 100, 10, 32, false, false, false, Materials.Lead, Materials.MeteoricIron, Materials.Lead, Materials.MeteoricIron); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.siliconmanganesegiant", true, 225, 235, 100, 10, 32, false, false, false, Materials.Silicon, Materials.Manganese, Materials.Silicon, Materials.Manganese); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.spessartinegiant", true, 230, 240, 100, 10, 32, false, false, false, Materials.Spessartine, Materials.Grossular, Materials.Spessartine, Materials.Grossular); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.mithrilgiant", true, 235, 245, 100, 10, 32, false, false, false, Materials.Phosphate, Materials.Mithril, Materials.Phosphate, Materials.Mithril); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.sodalitelazuritegiant", true, 240, 250, 100, 10, 32, false, false, false, Materials.Sodalite, Materials.Lazurite, Materials.Sodalite, Materials.Lazurite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.lapisemeraldgiant", true, 5, 15, 100, 10, 32, false, false, false, Materials.Lapis, Materials.Emerald, Materials.Lapis, Materials.Emerald); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.arditescheelitegiant", true, 10, 20, 100, 10, 32, false, false, false, Materials.Ardite, Materials.Scheelite, Materials.Ardite, Materials.Scheelite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.jaspermytrylgiant", true, 15, 25, 100, 10, 32, false, false, false, Materials.Jasper, Materials.Mytryl, Materials.Jasper, Materials.Mytryl); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.opalledoxgiant", true, 20, 30, 100, 10, 32, false, false, false, Materials.Opal, Materials.Ledox, Materials.Opal, Materials.Ledox); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.quantiumgiant", true, 25, 35, 100, 10, 32, false, false, false, Materials.Quantium, Materials.Amethyst, Materials.Quantium, Materials.Amethyst); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.yellowgarnetgiant", true, 30, 40, 100, 10, 32, false, false, false, Materials.GarnetYellow, Materials.Rutile, Materials.GarnetYellow, Materials.Rutile); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.galliumniobiumgiant", true, 35, 45, 100, 10, 32, false, false, false, Materials.Gallium, Materials.Niobium, Materials.Gallium, Materials.Niobium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.netherstargiant", true, 40, 50, 100, 10, 32, false, false, false, Materials.Yttrium, Materials.NetherStar, Materials.Yttrium, Materials.NetherStar); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.ceruclasevulcanitegiant", true, 45, 55, 100, 10, 32, false, false, false, Materials.Ceruclase, Materials.Vulcanite, Materials.Ceruclase, Materials.Vulcanite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.oriharukongiant", true, 50, 60, 100, 10, 32, false, false, false, Materials.Rubracium, Materials.Oriharukon, Materials.Rubracium, Materials.Oriharukon); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.tanzaniteorichalcumgiant", true, 55, 65, 100, 10, 32, false, false, false, Materials.Tanzanite, Materials.Orichalcum, Materials.Tanzanite, Materials.Orichalcum); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.vyroxeresmirabilitegiant", true, 60, 70, 100, 10, 32, false, false, false, Materials.Vyroxeres, Materials.Mirabilite, Materials.Vyroxeres, Materials.Mirabilite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.mithrilmagnesiumgiant", true, 65, 75, 100, 10, 32, false, false, false, Materials.Mithril, Materials.Magnesium, Materials.Mithril, Materials.Magnesium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.nikolitegiant", true, 70, 80, 100, 10, 32, false, false, false, Materials.Electrotine, Materials.Alunite, Materials.Electrotine, Materials.Alunite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.draconiumvinteumgiant", true, 140, 150, 100, 10, 32, false, false, false, Materials.Vinteum, Materials.Draconium, Materials.Vinteum, Materials.Draconium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.saltpetergiant", true, 145, 155, 100, 10, 32, false, false, false, Materials.Jade, Materials.Saltpeter, Materials.Jade, Materials.Saltpeter); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.callistoicegiant", true, 150, 160, 100, 10, 32, false, false, false, Materials.Alduorite, Materials.CallistoIce, Materials.Alduorite, Materials.CallistoIce); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.topazbluetopazgiant", true, 155, 165, 100, 10, 32, false, false, false, Materials.Topaz, Materials.BlueTopaz, Materials.Topaz, Materials.BlueTopaz); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.caesiumcadmiumgiant", true, 160, 170, 100, 10, 32, false, false, false, Materials.Caesium, Materials.Cadmium, Materials.Caesium, Materials.Cadmium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.lanthanumceriumgiant", true, 165, 175, 100, 10, 32, false, false, false, Materials.Lanthanum, Materials.Cerium, Materials.Lanthanum, Materials.Cerium); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.cobaltboraxgiant", true, 170, 180, 100, 10, 32, false, false, false, Materials.Cobalt, Materials.Borax, Materials.Cobalt, Materials.Borax); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.bedrockiumawakedraconiumgiant", true, 175, 185, 100, 10, 32, false, false, false, Materials.Bedrockium, Materials.DraconiumAwakened, Materials.Bedrockium, Materials.DraconiumAwakened); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.copperantimonygiant", true, 180, 190, 100, 10, 32, false, false, false, Materials.Copper, Materials.Antimony, Materials.Copper, Materials.Antimony); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.cassiteritearsenicgiant", true, 185, 195, 100, 10, 32, false, false, false, Materials.Cassiterite, Materials.Arsenic, Materials.Cassiterite, Materials.Arsenic); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.lepidoliteneodymiumgiant", true, 190, 200, 100, 10, 32, false, false, false, Materials.Neodymium, Materials.Lepidolite, Materials.Neodymium, Materials.Lepidolite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.rocksaltsaltgiant", true, 195, 205, 100, 10, 32, false, false, false, Materials.Salt, Materials.RockSalt, Materials.Salt, Materials.RockSalt); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.micacassiteritegiant", true, 200, 210, 100, 10, 32, false, false, false, Materials.Mica, Materials.Cassiterite, Materials.Mica, Materials.Cassiterite); -// new GT_Worldgen_GT_Ore_Layer("ore.mix.realgarneodymiumgiant", true, 205, 215, 100, 10, 32, false, false, false, Materials.Realgar, Materials.Neodymium, Materials.Realgar, Materials.Neodymium); - } } diff --git a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java index c8bde7c355..879383f0db 100644 --- a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java +++ b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java @@ -86,6 +86,7 @@ public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { return outputEnergy() ? TickRateModulation.FASTER : TickRateModulation.SLOWER; } + @Override public ForgeDirection getSide(){ try { Field fSide = AEBasePart.class.getDeclaredField("side"); 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 ded7f4a5d6..4b1ef8098c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_CircuitBehaviors.java @@ -3,8 +3,8 @@ package gregtech.loaders.preload; import gregtech.api.util.GT_Log; import gregtech.common.redstonecircuits.*; -public class GT_Loader_CircuitBehaviors - implements Runnable { +public class GT_Loader_CircuitBehaviors implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register Redstone Circuit behaviours."); new GT_Circuit_Timer(0); 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 6098159ad9..f9d10e7bae 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java @@ -13,164 +13,164 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_Loader_ItemData - implements Runnable { +public class GT_Loader_ItemData implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Loading Item Data Tags"); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantPick", 1L, 0), new ItemData(Materials.Stone, 696729600L, new MaterialStack[]{new MaterialStack(Materials.Wood, 464486400L)})); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantSword", 1L, 0), new ItemData(Materials.Stone, 464486400L, new MaterialStack[]{new MaterialStack(Materials.Wood, 232243200L)})); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantLog", 1L, 32767), new ItemData(Materials.Wood, 232243200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantCobble", 1L, 32767), new ItemData(Materials.Stone, 232243200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantObsidian", 1L, 32767), new ItemData(Materials.Obsidian, 232243200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.minotaurAxe", 1L, 0), new ItemData(Materials.Diamond, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 2L)})); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.armorShards", 1L, 0), new ItemData(Materials.Knightmetal, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.shardCluster", 1L, 0), new ItemData(Materials.Knightmetal, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.TF_LiveRoot.get(1L, new Object[0]), new ItemData(Materials.LiveRoot, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10), new ItemData(Materials.CertusQuartz, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11), new ItemData(Materials.NetherQuartz, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 12), new ItemData(Materials.Fluix, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.quartz_block, 1, 32767), new ItemData(Materials.NetherQuartz, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzPillar", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.wheat, 1, 32767), new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hay_block, 1, 32767), new ItemData(Materials.Wheat, 32659200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow, 1, 32767), new ItemData(Materials.Snow, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glowstone, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lit_redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L)})); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Forestry", "craftingMaterial", 1L, 5), new ItemData(Materials.Ice, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ice, 1, 32767), new ItemData(Materials.Ice, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.clay_ball, 1, 32767), new ItemData(Materials.Clay, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.clay, 1, 32767), new ItemData(Materials.Clay, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.brick_block, 1, 32767), new ItemData(Materials.Brick, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran238", 1L), new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran235", 1L), new ItemData(Materials.Uranium235, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Plutonium", 1L), new ItemData(Materials.Plutonium, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("smallUran235", 1L), new ItemData(Materials.Uranium235, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("smallPlutonium", 1L), new ItemData(Materials.Plutonium, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Iron.get(1L, new Object[0]), new ItemData(Materials.Iron, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Gold.get(1L, new Object[0]), new ItemData(Materials.Gold, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Bronze.get(1L, new Object[0]), new ItemData(Materials.Bronze, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Copper.get(1L, new Object[0]), new ItemData(Materials.Copper, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Tin.get(1L, new Object[0]), new ItemData(Materials.Tin, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Lead.get(1L, new Object[0]), new ItemData(Materials.Lead, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Steel.get(1L, new Object[0]), new ItemData(Materials.Steel, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.book, 1, 32767), new ItemData(Materials.Paper, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.written_book, 1, 32767), new ItemData(Materials.Paper, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.writable_book, 1, 32767), new ItemData(Materials.Paper, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.enchanted_book, 1, 32767), new ItemData(Materials.Paper, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 1), new ItemData(Materials.Gold, OrePrefixes.block.mMaterialAmount * 8L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 0), new ItemData(Materials.Gold, OrePrefixes.ingot.mMaterialAmount * 8L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_carrot, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.speckled_melon, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.minecart, 1), new ItemData(Materials.Iron, 18144000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.cauldron, 1), new ItemData(Materials.Iron, 25401600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.iron_bars, 8, 32767), new ItemData(Materials.Iron, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("dreamcraft", "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("ironFurnace", 1L), new ItemData(Materials.Iron, 18144000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Food_Can_Empty.get(1L, new Object[0]), new ItemData(Materials.Tin, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Rod_Empty.get(1L, new Object[0]), new ItemData(Materials.Iron, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Can_Empty.get(1L, new Object[0]), new ItemData(Materials.Tin, 25401600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Gold, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Iron, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 0), new ItemData(Materials.Steel, 108864000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 1), new ItemData(Materials.Steel, 72576000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 2), new ItemData(Materials.Steel, 36288000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 0), new ItemData(Materials.Iron, 108864000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 1), new ItemData(Materials.Iron, 72576000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 2), new ItemData(Materials.Iron, 36288000L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hopper, 1, 32767), new ItemData(Materials.Iron, 18144000L, new MaterialStack[]{new MaterialStack(Materials.Wood, 29030400L)})); - GT_OreDictUnificator.addItemData(ItemList.Cell_Universal_Fluid.get(1L, new Object[0]), new ItemData(Materials.Tin, 7257600L, new MaterialStack[]{new MaterialStack(Materials.Glass, 1360800L)})); - GT_OreDictUnificator.addItemData(ItemList.Cell_Empty.get(1L, new Object[0]), new ItemData(Materials.Tin, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.tripwire_hook, 1, 32767), new ItemData(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L, new MaterialStack[]{new MaterialStack(Materials.Wood, 3628800L)})); - GT_OreDictUnificator.addItemData(ItemList.Bottle_Empty.get(1L, new Object[0]), new ItemData(Materials.Glass, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.potionitem, 1, 32767), new ItemData(Materials.Glass, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass, 1, 32767), new ItemData(Materials.Glass, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass, 1, 32767), new ItemData(Materials.Glass, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.clock, 1, 32767), new ItemData(Materials.Gold, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Items.compass, 1, 32767), new ItemData(Materials.Iron, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_horse_armor, 1, 32767), new ItemData(Materials.Iron, 29030400L, new MaterialStack[]{new MaterialStack(Materials.Leather, 21772800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_horse_armor, 1, 32767), new ItemData(Materials.Gold, 29030400L, new MaterialStack[]{new MaterialStack(Materials.Leather, 21772800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Items.diamond_horse_armor, 1, 32767), new ItemData(Materials.Diamond, 29030400L, new MaterialStack[]{new MaterialStack(Materials.Leather, 21772800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Items.leather, 1, 32767), new ItemData(Materials.Leather, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.beacon, 1, 32767), new ItemData(Materials.NetherStar, 3628800L, new MaterialStack[]{new MaterialStack(Materials.Obsidian, 10886400L), new MaterialStack(Materials.Glass, 18144000L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.enchanting_table, 1, 32767), new ItemData(Materials.Diamond, 7257600L, new MaterialStack[]{new MaterialStack(Materials.Obsidian, 14515200L), new MaterialStack(Materials.Paper, 10886400L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ender_chest, 1, 32767), new ItemData(Materials.EnderEye, 3628800L, new MaterialStack[]{new MaterialStack(Materials.Obsidian, 29030400L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.bookshelf, 1, 32767), new ItemData(Materials.Paper, 32659200L, new MaterialStack[]{new MaterialStack(Materials.Wood, 21772800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lever, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[]{new MaterialStack(Materials.Wood, 1814400L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ice, 1, 32767), new ItemData(Materials.Ice, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow, 1, 32767), new ItemData(Materials.Snow, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow_layer, 1, 32767), new ItemData(Materials.Snow, -1L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sand, 1, 32767), new ItemData(Materials.Sand, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sandstone, 1, 32767), new ItemData(Materials.Sand, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 0), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 8), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 0), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 8), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 1), new ItemData(Materials.Sand, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 9), new ItemData(Materials.Sand, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 1), new ItemData(Materials.Sand, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 9), new ItemData(Materials.Sand, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 2), new ItemData(Materials.Wood, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 10), new ItemData(Materials.Wood, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 2), new ItemData(Materials.Wood, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 10), new ItemData(Materials.Wood, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 3), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 11), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 3), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 11), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 5), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 13), new ItemData(Materials.Stone, 1814400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 5), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 13), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lit_furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stonebrick, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.mossy_cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_button, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_pressure_plate, 1, 32767), new ItemData(Materials.Stone, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ladder, 1, 32767), new ItemData(Materials.Wood, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.wooden_button, 1, 32767), new ItemData(Materials.Wood, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.wooden_pressure_plate, 1, 32767), new ItemData(Materials.Wood, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.fence, 1, 32767), new ItemData(Materials.Wood, 5443200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.bowl, 1, 32767), new ItemData(Materials.Wood, 3628800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.sign, 1, 32767), new ItemData(Materials.Wood, 7257600L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.chest, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemData(Materials.Wood, 32659200L, new MaterialStack[]{new MaterialStack(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.unlit_redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.noteblock, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.jukebox, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack[]{new MaterialStack(Materials.Diamond, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.crafting_table, 1, 32767), new ItemData(Materials.Wood, 14515200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Wood, 10886400L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sticky_piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack[]{new MaterialStack(Materials.Wood, 10886400L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dispenser, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dropper, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack[]{new MaterialStack(Materials.Redstone, 3628800L)})); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetChicken", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetBeef", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetPork", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L, new MaterialStack[0])); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetFish", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L, new MaterialStack[0])); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantPick", 1L, 0), new ItemData(Materials.Stone, 696729600L, new MaterialStack(Materials.Wood, 464486400L))); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantSword", 1L, 0), new ItemData(Materials.Stone, 464486400L, new MaterialStack(Materials.Wood, 232243200L))); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantLog", 1L, 32767), new ItemData(Materials.Wood, 232243200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantCobble", 1L, 32767), new ItemData(Materials.Stone, 232243200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantObsidian", 1L, 32767), new ItemData(Materials.Obsidian, 232243200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.minotaurAxe", 1L, 0), new ItemData(Materials.Diamond, 14515200L, new MaterialStack(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 2L))); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.armorShards", 1L, 0), new ItemData(Materials.Knightmetal, 403200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.shardCluster", 1L, 0), new ItemData(Materials.Knightmetal, 3628800L)); + GT_OreDictUnificator.addItemData(ItemList.TF_LiveRoot.get(1L), new ItemData(Materials.LiveRoot, 3628800L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10), new ItemData(Materials.CertusQuartz, 1814400L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11), new ItemData(Materials.NetherQuartz, 1814400L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 12), new ItemData(Materials.Fluix, 1814400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.quartz_block, 1, 32767), new ItemData(Materials.NetherQuartz, 14515200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzPillar", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData(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.snow, 1, 32767), new ItemData(Materials.Snow, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glowstone, 1, 32767), new ItemData(Materials.Glowstone, 14515200L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lit_redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Forestry", "craftingMaterial", 1L, 5), new ItemData(Materials.Ice, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.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.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(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_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(new ItemStack(Items.book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.written_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.writable_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.enchanted_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 1), new ItemData(Materials.Gold, OrePrefixes.block.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 0), new ItemData(Materials.Gold, OrePrefixes.ingot.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_carrot, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.speckled_melon, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.minecart, 1), new ItemData(Materials.Iron, 18144000L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.cauldron, 1), new ItemData(Materials.Iron, 25401600L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.iron_bars, 8, 32767), new ItemData(Materials.Iron, 10886400L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("dreamcraft", "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("ironFurnace", 1L), new ItemData(Materials.Iron, 18144000L)); + GT_OreDictUnificator.addItemData(ItemList.IC2_Food_Can_Empty.get(1L), new ItemData(Materials.Tin, 1814400L)); + GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Rod_Empty.get(1L), new ItemData(Materials.Iron, 3628800L)); + GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Can_Empty.get(1L), new ItemData(Materials.Tin, 25401600L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Gold, 7257600L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Iron, 7257600L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 0), new ItemData(Materials.Steel, 108864000L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 1), new ItemData(Materials.Steel, 72576000L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 2), new ItemData(Materials.Steel, 36288000L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 0), new ItemData(Materials.Iron, 108864000L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 1), new ItemData(Materials.Iron, 72576000L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 2), new ItemData(Materials.Iron, 36288000L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hopper, 1, 32767), new ItemData(Materials.Iron, 18144000L, new MaterialStack(Materials.Wood, 29030400L))); + GT_OreDictUnificator.addItemData(ItemList.Cell_Universal_Fluid.get(1L), new ItemData(Materials.Tin, 7257600L, new MaterialStack(Materials.Glass, 1360800L))); + GT_OreDictUnificator.addItemData(ItemList.Cell_Empty.get(1L), new ItemData(Materials.Tin, 7257600L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.tripwire_hook, 1, 32767), new ItemData(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L, new MaterialStack(Materials.Wood, 3628800L))); + GT_OreDictUnificator.addItemData(ItemList.Bottle_Empty.get(1L), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.potionitem, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.clock, 1, 32767), new ItemData(Materials.Gold, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Items.compass, 1, 32767), new ItemData(Materials.Iron, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_horse_armor, 1, 32767), new ItemData(Materials.Iron, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_horse_armor, 1, 32767), new ItemData(Materials.Gold, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Items.diamond_horse_armor, 1, 32767), new ItemData(Materials.Diamond, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Items.leather, 1, 32767), new ItemData(Materials.Leather, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.beacon, 1, 32767), new ItemData(Materials.NetherStar, 3628800L, new MaterialStack(Materials.Obsidian, 10886400L), new MaterialStack(Materials.Glass, 18144000L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.enchanting_table, 1, 32767), new ItemData(Materials.Diamond, 7257600L, new MaterialStack(Materials.Obsidian, 14515200L), new MaterialStack(Materials.Paper, 10886400L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ender_chest, 1, 32767), new ItemData(Materials.EnderEye, 3628800L, new MaterialStack(Materials.Obsidian, 29030400L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.bookshelf, 1, 32767), new ItemData(Materials.Paper, 32659200L, new MaterialStack(Materials.Wood, 21772800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lever, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack(Materials.Wood, 1814400L))); + GT_OreDictUnificator.addItemData(new ItemStack(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.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(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.fence, 1, 32767), new ItemData(Materials.Wood, 5443200L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.bowl, 1, 32767), new ItemData(Materials.Wood, 3628800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.sign, 1, 32767), new ItemData(Materials.Wood, 7257600L)); + GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.chest, 1, 32767), new ItemData(Materials.Wood, 29030400L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemData(Materials.Wood, 32659200L, new MaterialStack(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.unlit_redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.noteblock, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.jukebox, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Diamond, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.crafting_table, 1, 32767), new ItemData(Materials.Wood, 14515200L)); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sticky_piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dispenser, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dropper, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetChicken", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetBeef", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetPork", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetFish", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); for (ItemStack tItem : new ItemStack[]{GT_ModHandler.getModItem("TwilightForest", "item.meefRaw", 1L, 0), GT_ModHandler.getModItem("TwilightForest", "item.venisonRaw", 1L, 0), new ItemStack(Items.porkchop), new ItemStack(Items.beef), new ItemStack(Items.chicken), new ItemStack(Items.fish)}) { if (tItem != null) { - GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, new Object[]{tItem}), new ItemData(Materials.MeatRaw, 3628800L, new MaterialStack[]{new MaterialStack(Materials.Bone, 403200L)})); + GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, tItem), new ItemData(Materials.MeatRaw, 3628800L, new MaterialStack(Materials.Bone, 403200L))); } } for (ItemStack tItem : new ItemStack[]{GT_ModHandler.getModItem("TwilightForest", "item.meefSteak", 1L, 0), GT_ModHandler.getModItem("TwilightForest", "item.venisonCooked", 1L, 0), new ItemStack(Items.cooked_porkchop), new ItemStack(Items.cooked_beef), new ItemStack(Items.cooked_chicken), new ItemStack(Items.cooked_fished)}) { if (tItem != null) { - GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, new Object[]{tItem}), new ItemData(Materials.MeatCooked, 3628800L, new MaterialStack[]{new MaterialStack(Materials.Bone, 403200L)})); + GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, tItem), new ItemData(Materials.MeatCooked, 3628800L, new MaterialStack(Materials.Bone, 403200L))); } } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 7e91f6ef7c..c50ca5a047 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 @@ -6,6 +6,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; +import gregtech.api.items.GT_Block_LongDistancePipe; import gregtech.api.items.GT_Generic_Item; import gregtech.api.items.GT_RadioactiveCellIC_Item; import gregtech.api.metatileentity.BaseMetaPipeEntity; @@ -16,8 +17,6 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.*; import gregtech.common.items.*; -import gregtech.common.items.armor.ElectricModularArmor1; -import gregtech.common.items.armor.ModularArmor_Item; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -29,8 +28,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.Locale; -public class GT_Loader_Item_Block_And_Fluid - implements Runnable { +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.Lava.mFluid = GT_ModHandler.getLava(1000L).getFluid(); @@ -127,24 +126,18 @@ public class GT_Loader_Item_Block_And_Fluid ItemList.ThoriumCell_1.set(new GT_RadioactiveCellIC_Item("Thoriumcell", "Fuel Rod (Thorium)", 1, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_1.get(1, new Object[0]), false)); ItemList.ThoriumCell_2.set(new GT_RadioactiveCellIC_Item("Double_Thoriumcell", "Dual Fuel Rod (Thorium)", 2, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_2.get(1, new Object[0]), false)); ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Thoriumcell", "Quad Fuel Rod (Thorium)", 4, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_4.get(1, new Object[0]), false)); - - GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); - GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); - + GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)}); GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)}); GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)}); - + ItemList.Depleted_Naquadah_1.set(new GT_DepletetCell_Item("NaquadahcellDep", "Fuel Rod (Depleted Naquadah)", 1)); ItemList.Depleted_Naquadah_2.set(new GT_DepletetCell_Item("Double_NaquadahcellDep", "Dual Fuel Rod (Depleted Naquadah)", 1)); ItemList.Depleted_Naquadah_4.set(new GT_DepletetCell_Item("Quad_NaquadahcellDep", "Quad Fuel Rod (Depleted Naquadah)", 1)); ItemList.NaquadahCell_1.set(new GT_RadioactiveCellIC_Item("Naquadahcell", "Fuel Rod (Naquadah)", 1, 100000, 2F, 1, 1F, ItemList.Depleted_Naquadah_1.get(1, new Object[0]), false)); ItemList.NaquadahCell_2.set(new GT_RadioactiveCellIC_Item("Double_Naquadahcell", "Dual Fuel Rod (Naquadah)", 2, 100000, 2F, 1, 1F, ItemList.Depleted_Naquadah_2.get(1, new Object[0]), false)); ItemList.NaquadahCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Naquadahcell", "Quad Fuel Rod (Naquadah)", 4, 100000, 2F, 1, 1F, ItemList.Depleted_Naquadah_4.get(1, new Object[0]), false)); - - ////GT_ModHandler.addCraftingRecipe(ItemList.NaquadahCell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.NaquadahCell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); - ////GT_ModHandler.addCraftingRecipe(ItemList.NaquadahCell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.NaquadahCell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); - //(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) + GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_Naquadah_1.get(1), null,null,null, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), @@ -220,17 +213,11 @@ public class GT_Loader_Item_Block_And_Fluid GregTech_API.sBlockCasings6 = new GT_Block_Casings6(); GregTech_API.sBlockCasings8 = new GT_Block_Casings8(); GregTech_API.sBlockGranites = new GT_Block_Granites(); + GregTech_API.sBlockLongDistancePipes = new GT_Block_LongDistancePipe(); GregTech_API.sBlockConcretes = new GT_Block_Concretes(); GregTech_API.sBlockStones = new GT_Block_Stones(); GregTech_API.sBlockOres1 = new GT_Block_Ores(); -// if (Loader.isModLoaded("UndergroundBiomes")) { -// GregTech_API.sBlockOresUb1 = new GT_Block_Ores_UB1(); -// GregTech_API.sBlockOresUb2 = new GT_Block_Ores_UB2(); -// GregTech_API.sBlockOresUb3 = new GT_Block_Ores_UB3(); -// } - //if(Loader.isModLoaded("GalacticraftCore") && Loader.isModLoaded("GalacticraftMars")) { - // GregTech_API.sBlockOresGC = new GT_Block_Ores_GC(); - //} + GregTech_API.sBlockMetal1 = new GT_Block_Metal("gt.blockmetal1", new Materials[]{ Materials.Adamantium, Materials.Aluminium, @@ -379,6 +366,7 @@ public class GT_Loader_Item_Block_And_Fluid 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[]{ @@ -465,7 +453,6 @@ public class GT_Loader_Item_Block_And_Fluid GT_Mod.gregtechproxy.addFluid("Oxygen", "Oxygen", Materials.Oxygen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Hydrogen", "Hydrogen", Materials.Hydrogen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Deuterium", "Deuterium", Materials.Deuterium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Deuterium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - //GT_Mod.gregtechproxy.addFluid("SaltWater", "Salt Water", Materials.SaltWater, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SaltWater, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Tritium", "Tritium", Materials.Tritium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Tritium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Helium", "Helium", Materials.Helium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Argon", "Argon", Materials.Argon, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); @@ -474,8 +461,6 @@ public class GT_Loader_Item_Block_And_Fluid GT_Mod.gregtechproxy.addFluid("Titaniumtetrachloride", "Titaniumtetrachloride", Materials.Titaniumtetrachloride, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Titaniumtetrachloride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Helium-3", "Helium-3", Materials.Helium_3, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium_3, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Methane", "Methane", Materials.Methane, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - //GT_Mod.gregtechproxy.addFluid("Ethane", "Ethane", Materials.Ethane, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethane, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - //GT_Mod.gregtechproxy.addFluid("Ethylene", "Ethylene", Materials.Ethylene, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethylene, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Nitrogen", "Nitrogen", Materials.Nitrogen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("NitrogenDioxide", "Nitrogen Dioxide", Materials.NitrogenDioxide, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("Steam", "Steam", Materials.Water, 2, 375, GT_ModHandler.getIC2Item("steamCell", 1), Materials.Empty.getCells(1), 1000); @@ -731,7 +716,6 @@ public class GT_Loader_Item_Block_And_Fluid } } GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.cobblestone, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), null, 0, false); - //GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.stone, 1, 32767), new ItemStack(Blocks.cobblestone, 1), null, 0, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.gravel, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new ItemStack(Items.flint, 1), 10, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.lit_furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false); @@ -757,19 +741,6 @@ public class GT_Loader_Item_Block_And_Fluid 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)); - ItemList.ModularBasicHelmet.set(new ModularArmor_Item(0, 0, "modulararmor_helmet", 0)); - ItemList.ModularBasicChestplate.set(new ModularArmor_Item(0, 1, "modulararmor_chestplate", 0)); - ItemList.ModularBasicLeggings.set(new ModularArmor_Item(0, 2, "modulararmor_leggings", 0)); - ItemList.ModularBasicBoots.set(new ModularArmor_Item(0, 3, "modulararmor_boots", 0)); - ItemList.ModularElectric1Helmet.set(new ElectricModularArmor1(0, 0, "modularelectric1_helmet", 1)); - ItemList.ModularElectric1Chestplate.set(new ElectricModularArmor1(0, 1, "modularelectric1_chestplate", 1)); - ItemList.ModularElectric1Leggings.set(new ElectricModularArmor1(0, 2, "modularelectric1_leggings", 1)); - ItemList.ModularElectric1Boots.set(new ElectricModularArmor1(0, 3, "modularelectric1_boots", 1)); - ItemList.ModularElectric2Helmet.set(new ElectricModularArmor1(0, 0, "modularelectric2_helmet", 2)); - ItemList.ModularElectric2Chestplate.set(new ElectricModularArmor1(0, 1, "modularelectric2_chestplate", 2)); - ItemList.ModularElectric2Leggings.set(new ElectricModularArmor1(0, 2, "modularelectric2_leggings", 2)); - ItemList.ModularElectric2Boots.set(new ElectricModularArmor1(0, 3, "modularelectric2_boots", 2)); - 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 { 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 7132321048..c45951a06f 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -10,14 +10,12 @@ import gregtech.api.util.*; import gregtech.common.tileentities.automation.*; import gregtech.common.tileentities.boilers.*; import gregtech.common.tileentities.generators.*; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_Bronze; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_BronzeBricks; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_Steel; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_SteelBricks; +import gregtech.common.tileentities.machines.*; import gregtech.common.tileentities.machines.basic.*; import gregtech.common.tileentities.machines.multi.*; import gregtech.common.tileentities.machines.steam.*; import gregtech.common.tileentities.storage.*; +import gregtech.common.tileentities.machines.long_distance.*; import gregtech.loaders.postload.GT_ProcessingArrayRecipeLoader; import ic2.core.Ic2Items; import net.minecraft.init.Blocks; @@ -26,16 +24,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUIT RECIPES AND USAGES - private final static String aTextWire1 = "wire."; private static final String aTextCable1 = "cable."; private static final String aTextWire2 = " Wire"; private static final String aTextCable2 = " Cable"; - private final static String aTextPlate = "PPP"; private final static String aTextPlateWrench = "PwP"; private final static String aTextPlateMotor = "PMP"; private final static String aTextCableHull = "CMC"; - private final static String aTextWireHull = "WMW"; private final static String aTextWireChest = "WTW"; private final static String aTextWireCoil = "WCW"; private final static String aTextMotorWire = "EWE"; - private final static String aTextWirePump = "WPW"; - public final static String imagination=EnumChatFormatting.RESET + "You just need " + EnumChatFormatting.DARK_PURPLE + "I" + EnumChatFormatting.LIGHT_PURPLE + "m" + EnumChatFormatting.DARK_RED + "a" + EnumChatFormatting.RED + "g" + EnumChatFormatting.YELLOW + "i" + EnumChatFormatting.GREEN + "n" + EnumChatFormatting.AQUA + "a" + EnumChatFormatting.DARK_AQUA + "t" + EnumChatFormatting.BLUE + "i" + EnumChatFormatting.DARK_BLUE + "o" + EnumChatFormatting.DARK_PURPLE + "n" + EnumChatFormatting.RESET + " to use this."; - private final static long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; - private final static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | bits; - - private final static boolean aBoolConst_0 = false; - private final static Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); + private static final String aTextWire1 = "wire."; private static final String aTextCable1 = "cable."; private static final String aTextWire2 = " Wire"; private static final String aTextCable2 = " Cable"; + private static final String aTextPlate = "PPP"; private static final String aTextPlateWrench = "PwP"; private static final String aTextPlateMotor = "PMP"; private static final String aTextCableHull = "CMC"; + private static final String aTextWireHull = "WMW"; private static final String aTextWireChest = "WTW"; private static final String aTextWireCoil = "WCW"; private static final String aTextMotorWire = "EWE"; + private static final String aTextWirePump = "WPW"; + public static final String imagination=EnumChatFormatting.RESET + "You just need " + EnumChatFormatting.DARK_PURPLE + "I" + EnumChatFormatting.LIGHT_PURPLE + "m" + EnumChatFormatting.DARK_RED + "a" + EnumChatFormatting.RED + "g" + EnumChatFormatting.YELLOW + "i" + EnumChatFormatting.GREEN + "n" + EnumChatFormatting.AQUA + "a" + EnumChatFormatting.DARK_AQUA + "t" + EnumChatFormatting.BLUE + "i" + EnumChatFormatting.DARK_BLUE + "o" + EnumChatFormatting.DARK_PURPLE + "n" + EnumChatFormatting.RESET + " to use this."; + private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + private static final long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | bits; + + private static final boolean aBoolConst_0 = false; + 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)}); @@ -72,20 +70,11 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI 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_Vent.get(1L), bits, new Object[]{"PPP", "SSS", "MFV", 'P', new ItemStack(Blocks.iron_bars,1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel),'S',ItemList.Component_Filter});//TODO dream - this is added recipe for vent casing 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_Coil_Cupronickel.get(1L), bits, new Object[]{"SCS", "MMM", "PPP", 'M', OrePrefixes.wireGt04.get(Materials.Cupronickel), 'P', OrePrefixes.dust.get(Materials.Mica)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_Kanthal.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.Kanthal)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_Nichrome.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.Nichrome)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_TungstenSteel.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.TungstenSteel)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_HSSG.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.HSSG)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_Naquadah.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.Naquadah)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_NaquadahAlloy.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.NaquadahAlloy)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Coil_Superconductor.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, "PwP", 'P', OrePrefixes.wireGt02.get(Materials.Superconductor)}); 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}); @@ -108,10 +97,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_FrostHazard}); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_NoiseHazard}); - //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_Coil_Cupronickel.get(1L), bits, new Object[] {ItemList.Casing_Coil_Cupronickel_Deprecated}); - //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_Coil_Kanthal.get(1L), bits, new Object[] {ItemList.Casing_Coil_Kanthal_Deprecated}); - //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_Coil_Nichrome.get(1L), bits, new Object[] {ItemList.Casing_Coil_Nichrome_Deprecated}); - 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}); @@ -197,9 +182,9 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI 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.cableGt02.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.cableGt04.get(Materials.NaquadahAlloy), 'B', OrePrefixes.cableGt02.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.SuperconductorUHV), 'B', OrePrefixes.cableGt04.get(Materials.NaquadahAlloy),'K',ItemList.Circuit_Chip_NPIC}); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_ZPM_LuV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_LuV, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah), 'B', OrePrefixes.cableGt01.get(Materials.VanadiumGallium),'K',ItemList.Circuit_Chip_HPIC}); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_UV_ZPM.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'B', OrePrefixes.cableGt01.get(Materials.Naquadah),'K',ItemList.Circuit_Chip_UHPIC}); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_MAX_UV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_UV, 'C', OrePrefixes.wireGt01.get(Materials.Bedrockium), 'B', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy),'K',ItemList.Circuit_Chip_NPIC}); ItemList.Hatch_Dynamo_ULV.set(new GT_MetaTileEntity_Hatch_Dynamo(30, "hatch.dynamo.tier.00", "ULV Dynamo Hatch", 0).getStackForm(1L)); ItemList.Hatch_Dynamo_LV.set(new GT_MetaTileEntity_Hatch_Dynamo(31, "hatch.dynamo.tier.01", "LV Dynamo Hatch", 1).getStackForm(1L)); @@ -242,10 +227,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Hatch_Input_UV.set(new GT_MetaTileEntity_Hatch_Input(58, "hatch.input.tier.08", "Input Hatch (UV)", 8).getStackForm(1L)); ItemList.Hatch_Input_MAX.set(new GT_MetaTileEntity_Hatch_Input(59, "hatch.input.tier.09", "Input Hatch (UHV)", 9).getStackForm(1L)); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_ULV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.plate.get(Materials.Rubber), 'I', OrePrefixes.pipeMedium.get(Materials.Copper), 'X', ItemList.Cell_Empty}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_LV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_LV, 'C', ItemList.Electric_Pump_LV, 'I', OrePrefixes.pipeMedium.get(Materials.Bronze), 'X', ItemList.Large_Fluid_Cell_Steel}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_MV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_MV, 'C', ItemList.Electric_Pump_MV, 'I', OrePrefixes.pipeMedium.get(Materials.Steel), 'X', ItemList.Large_Fluid_Cell_Aluminium}); - ItemList.Hatch_Output_ULV.set(new GT_MetaTileEntity_Hatch_Output(60, "hatch.output.tier.00", "Output Hatch (ULV)", 0).getStackForm(1L)); ItemList.Hatch_Output_LV.set(new GT_MetaTileEntity_Hatch_Output(61, "hatch.output.tier.01", "Output Hatch (LV)", 1).getStackForm(1L)); ItemList.Hatch_Output_MV.set(new GT_MetaTileEntity_Hatch_Output(62, "hatch.output.tier.02", "Output Hatch (MV)", 2).getStackForm(1L)); @@ -257,34 +238,18 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Hatch_Output_UV.set(new GT_MetaTileEntity_Hatch_Output(68, "hatch.output.tier.08", "Output Hatch (UV)", 8).getStackForm(1L)); ItemList.Hatch_Output_MAX.set(new GT_MetaTileEntity_Hatch_Output(69, "hatch.output.tier.09", "Output Hatch (UHV)", 9).getStackForm(1L)); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_ULV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.plate.get(Materials.Rubber), 'I', OrePrefixes.pipeMedium.get(Materials.Copper), 'X', ItemList.Cell_Empty}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_LV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_LV, 'C', ItemList.Electric_Pump_LV, 'I', OrePrefixes.pipeMedium.get(Materials.Bronze), 'X', ItemList.Large_Fluid_Cell_Steel}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_MV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_MV, 'C', ItemList.Electric_Pump_MV, 'I', OrePrefixes.pipeMedium.get(Materials.Steel), 'X', ItemList.Large_Fluid_Cell_Aluminium}); - ItemList.Quantum_Tank_LV.set(new GT_MetaTileEntity_QuantumTank(120, "quantum.tank.tier.06", "Quantum Tank I", 6).getStackForm(1L)); ItemList.Quantum_Tank_MV.set(new GT_MetaTileEntity_QuantumTank(121, "quantum.tank.tier.07", "Quantum Tank II", 7).getStackForm(1L)); ItemList.Quantum_Tank_HV.set(new GT_MetaTileEntity_QuantumTank(122, "quantum.tank.tier.08", "Quantum Tank III", 8).getStackForm(1L)); ItemList.Quantum_Tank_EV.set(new GT_MetaTileEntity_QuantumTank(123, "quantum.tank.tier.09", "Quantum Tank IV", 9).getStackForm(1L)); ItemList.Quantum_Tank_IV.set(new GT_MetaTileEntity_QuantumTank(124, "quantum.tank.tier.10", "Quantum Tank V", 10).getStackForm(1L)); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Tank_LV.get(1L), bitsd, new Object[]{"DGD", aTextPlateMotor, "DPD", 'M', ItemList.Hull_LV, 'G', ItemList.Field_Generator_LV, 'D', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.StainlessSteel)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Tank_MV.get(1L), bitsd, new Object[]{"DGD", aTextPlateMotor, "DPD", 'M', ItemList.Hull_MV, 'G', ItemList.Field_Generator_MV, 'D', OrePrefixes.circuit.get(Materials.Data), 'P', OrePrefixes.plate.get(Materials.Titanium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Tank_HV.get(1L), bitsd, new Object[]{"DGD", aTextPlateMotor, "DPD", 'M', ItemList.Hull_HV, 'G', ItemList.Field_Generator_HV, 'D', OrePrefixes.circuit.get(Materials.Elite), 'P', OrePrefixes.plate.get(Materials.TungstenSteel)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Tank_EV.get(1L), bitsd, new Object[]{"DGD", aTextPlateMotor, "DPD", 'M', ItemList.Hull_EV, 'G', ItemList.Field_Generator_EV, 'D', OrePrefixes.circuit.get(Materials.Master), 'P', OrePrefixes.plate.get(Materials.Europium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Tank_IV.get(1L), bitsd, new Object[]{"DGD", aTextPlateMotor, "DPD", 'M', ItemList.Hull_IV, 'G', ItemList.Field_Generator_IV, 'D', OrePrefixes.circuit.get(Materials.Ultimate), 'P', OrePrefixes.plate.get(Materials.Americium)}); - ItemList.Quantum_Chest_LV.set(new GT_MetaTileEntity_QuantumChest(125, "quantum.chest.tier.06", "Quantum Chest I", 6).getStackForm(1L)); ItemList.Quantum_Chest_MV.set(new GT_MetaTileEntity_QuantumChest(126, "quantum.chest.tier.07", "Quantum Chest II", 7).getStackForm(1L)); ItemList.Quantum_Chest_HV.set(new GT_MetaTileEntity_QuantumChest(127, "quantum.chest.tier.08", "Quantum Chest III", 8).getStackForm(1L)); ItemList.Quantum_Chest_EV.set(new GT_MetaTileEntity_QuantumChest(128, "quantum.chest.tier.09", "Quantum Chest IV", 9).getStackForm(1L)); ItemList.Quantum_Chest_IV.set(new GT_MetaTileEntity_QuantumChest(129, "quantum.chest.tier.10", "Quantum Chest V", 10).getStackForm(1L)); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_LV.get(1L), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_LV, 'G', ItemList.Field_Generator_LV, 'D', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.StainlessSteel)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_MV.get(1L), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_MV, 'G', ItemList.Field_Generator_MV, 'D', OrePrefixes.circuit.get(Materials.Data), 'P', OrePrefixes.plate.get(Materials.Titanium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_HV.get(1L), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_HV, 'G', ItemList.Field_Generator_HV, 'D', OrePrefixes.circuit.get(Materials.Elite), 'P', OrePrefixes.plate.get(Materials.TungstenSteel)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_EV.get(1L), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_EV, 'G', ItemList.Field_Generator_EV, 'D', OrePrefixes.circuit.get(Materials.Master), 'P', OrePrefixes.plate.get(Materials.Europium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_IV.get(1L), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_IV, 'G', ItemList.Field_Generator_IV, 'D', OrePrefixes.circuit.get(Materials.Ultimate), 'P', OrePrefixes.plate.get(Materials.Americium)}); - 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)); @@ -297,6 +262,11 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Super_Chest_EV.set(new GT_MetaTileEntity_SuperChest(138, "super.chest.tier.04", "Super Chest IV", 4).getStackForm(1L)); ItemList.Super_Chest_IV.set(new GT_MetaTileEntity_SuperChest(139, "super.chest.tier.05", "Super Chest V", 5).getStackForm(1L)); + ItemList.Long_Distance_Pipeline_Fluid.set(new GT_MetaTileEntity_LongDistancePipelineFluid(2700, "long.distance.pipeline.fluid", "Long Distance Fluid Pipeline", 1).getStackForm(1L)); + ItemList.Long_Distance_Pipeline_Item.set(new GT_MetaTileEntity_LongDistancePipelineItem(2701, "long.distance.pipeline.item", "Long Distance Item Pipeline", 1).getStackForm(1L)); + + ItemList.Hatch_Output_Bus_ME.set(new GT_MetaTileEntity_Hatch_OutputBus_ME(2710, "hatch.output_bus.me", "Output Bus (ME)").getStackForm(1L)); + ItemList.Hatch_Input_Bus_ULV.set(new GT_MetaTileEntity_Hatch_InputBus(70, "hatch.input_bus.tier.00", "Input Bus (ULV)", 0).getStackForm(1L)); ItemList.Hatch_Input_Bus_LV.set(new GT_MetaTileEntity_Hatch_InputBus(71, "hatch.input_bus.tier.01", "Input Bus (LV)", 1).getStackForm(1L)); ItemList.Hatch_Input_Bus_MV.set(new GT_MetaTileEntity_Hatch_InputBus(72, "hatch.input_bus.tier.02", "Input Bus (MV)", 2).getStackForm(1L)); @@ -308,10 +278,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Hatch_Input_Bus_UV.set(new GT_MetaTileEntity_Hatch_InputBus(78, "hatch.input_bus.tier.08", "Input Bus (UV)", 8).getStackForm(1L)); ItemList.Hatch_Input_Bus_MAX.set(new GT_MetaTileEntity_Hatch_InputBus(79, "hatch.input_bus.tier.09", "Input Bus (UHV)", 9).getStackForm(1L)); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_Bus_ULV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.plate.get(Materials.Lead), 'I', OrePrefixes.pipeMedium.get(Materials.Tin), 'X', new ItemStack(Blocks.chest, 1, 0)}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_Bus_LV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_LV, 'C', ItemList.Conveyor_Module_LV, 'I', OrePrefixes.pipeMedium.get(Materials.Nickel), 'X', new ItemStack(Blocks.chest, 1, 0)}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Input_Bus_MV.get(1L), bitsd, new Object[]{"CX ", "MI ", 'M', ItemList.Hull_MV, 'C', ItemList.Conveyor_Module_MV, 'I', OrePrefixes.pipeMedium.get(Materials.Cobalt), 'X', new ItemStack(Blocks.chest, 1, 0)}); - ItemList.Hatch_Output_Bus_ULV.set(new GT_MetaTileEntity_Hatch_OutputBus(80, "hatch.output_bus.tier.00", "Output Bus (ULV)", 0).getStackForm(1L)); ItemList.Hatch_Output_Bus_LV.set(new GT_MetaTileEntity_Hatch_OutputBus(81, "hatch.output_bus.tier.01", "Output Bus (LV)", 1).getStackForm(1L)); ItemList.Hatch_Output_Bus_MV.set(new GT_MetaTileEntity_Hatch_OutputBus(82, "hatch.output_bus.tier.02", "Output Bus (MV)", 2).getStackForm(1L)); @@ -323,10 +289,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Hatch_Output_Bus_UV.set(new GT_MetaTileEntity_Hatch_OutputBus(88, "hatch.output_bus.tier.08", "Output Bus (UV)", 8).getStackForm(1L)); ItemList.Hatch_Output_Bus_MAX.set(new GT_MetaTileEntity_Hatch_OutputBus(89, "hatch.output_bus.tier.09", "Output Bus (UHV)", 9).getStackForm(1L)); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_Bus_ULV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.plate.get(Materials.Lead), 'I', OrePrefixes.pipeMedium.get(Materials.Tin), 'X', new ItemStack(Blocks.chest, 1, 0)}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_Bus_LV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_LV, 'C', ItemList.Conveyor_Module_LV, 'I', OrePrefixes.pipeMedium.get(Materials.Nickel), 'X', new ItemStack(Blocks.chest, 1, 0)}); -// GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Output_Bus_MV.get(1L), bitsd, new Object[]{" XC", "IM ", 'M', ItemList.Hull_MV, 'C', ItemList.Conveyor_Module_MV, 'I', OrePrefixes.pipeMedium.get(Materials.Cobalt), 'X', new ItemStack(Blocks.chest, 1, 0)}); - ItemList.Hatch_Maintenance.set(new GT_MetaTileEntity_Hatch_Maintenance(90, "hatch.maintenance", "Maintenance Hatch", 1).getStackForm(1L)); GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMc", "fsr", 'M', ItemList.Hull_LV}); @@ -371,9 +333,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Solar.get(1L), bits, new Object[]{"GGG", "SSS", aTextPlateMotor, 'M', ItemList.Hull_HP_Bricks, 'P', OrePrefixes.pipeSmall.get(Materials.Steel), 'S', OrePrefixes.plateTriple.get(Materials.Silver), 'G', GT_ModHandler.getModItem("IC2","blockAlloyGlass",1L)}); ItemList.Machine_Bronze_BlastFurnace.set(new GT_MetaTileEntity_BronzeBlastFurnace(108, "bronzemachine.blastfurnace", "Bronze Plated Blast Furnace").getStackForm(1L)); - //if (!Loader.isModLoaded("terrafirmacraft")) { - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_BlastFurnace.get(1L), bits, new Object[]{"PFP", "FwF", "PFP", 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OreDictNames.craftingIronFurnace}); - //} ItemList.Machine_Bronze_Furnace.set(new GT_MetaTileEntity_Furnace_Bronze(103, "bronzemachine.furnace", "Steam Furnace").getStackForm(1L)); ItemList.Machine_HP_Furnace.set(new GT_MetaTileEntity_Furnace_Steel(104, "hpmachine.furnace", "High Pressure Furnace").getStackForm(1L)); ItemList.Machine_Bronze_Macerator.set(new GT_MetaTileEntity_Macerator_Bronze(106, "bronzemachine.macerator", "Steam Macerator").getStackForm(1L)); @@ -539,109 +498,73 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Machine_HV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(203, "basicmachine.alloysmelter.tier.03", "Advanced Alloy Smelter II", 3, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_EV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(204, "basicmachine.alloysmelter.tier.04", "Advanced Alloy Smelter III", 4, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_IV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(205, "basicmachine.alloysmelter.tier.05", "Advanced Alloy Smelter IV", 5, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(206, "basicmachine.alloysmelter.tier.06", "Advanced Alloy Smelter V", 6, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(207, "basicmachine.alloysmelter.tier.07", "Advanced Alloy Smelter VI", 7, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_UV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(208, "basicmachine.alloysmelter.tier.08", "Advanced Alloy Smelter VII", 8, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_LV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(211, "basicmachine.assembler.tier.01", "Basic Assembling Machine", 1, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", aBoolConst_0, aBoolConst_0, 0, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(212, "basicmachine.assembler.tier.02", "Advanced Assembling Machine", 2, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 24000, 0, 1, "Assembler2.png", "", aBoolConst_0, aBoolConst_0, 0, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(213, "basicmachine.assembler.tier.03", "Advanced Assembling Machine II", 3, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 32000, 0, 1, "Assembler2.png", "", aBoolConst_0, aBoolConst_0, 0, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(214, "basicmachine.assembler.tier.04", "Advanced Assembling Machine III", 4, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 48000, 0, 1, "Assembler2.png", "", aBoolConst_0, aBoolConst_0, 0, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(215, "basicmachine.assembler.tier.05", "Advanced Assembling Machine IV", 5, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 64000, 0, 1, "Assembler2.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(216, "basicmachine.assembler.tier.06", "Advanced Assembling Machine V", 6, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(217, "basicmachine.assembler.tier.07", "Advanced Assembling Machine VI", 7, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(218, "basicmachine.assembler.tier.08", "Advanced Assembling Machine VII", 8, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", aBoolConst_0, aBoolConst_0, 0, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(221, "basicmachine.bender.tier.01", "Basic Bending Machine", 1, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(222, "basicmachine.bender.tier.02", "Advanced Bending Machine", 2, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(223, "basicmachine.bender.tier.03", "Advanced Bending Machine II", 3, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(224, "basicmachine.bender.tier.04", "Advanced Bending Machine III", 4, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(225, "basicmachine.bender.tier.05", "Advanced Bending Machine IV", 5, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(226, "basicmachine.bender.tier.06", "Advanced Bending Machine V", 6, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(227, "basicmachine.bender.tier.07", "Advanced Bending Machine VI", 7, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(228, "basicmachine.bender.tier.08", "Advanced Bending Machine VII", 8, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(231, "basicmachine.canner.tier.01", "Basic Canning Machine", 1, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(232, "basicmachine.canner.tier.02", "Advanced Canning Machine", 2, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(233, "basicmachine.canner.tier.03", "Advanced Canning Machine II", 3, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(234, "basicmachine.canner.tier.04", "Advanced Canning Machine III", 4, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(235, "basicmachine.canner.tier.05", "Advanced Canning Machine IV", 5, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(236, "basicmachine.canner.tier.06", "Advanced Canning Machine V", 6, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(237, "basicmachine.canner.tier.07", "Advanced Canning Machine VI", 7, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(238, "basicmachine.canner.tier.08", "Advanced Canning Machine VII", 8, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - + ItemList.Machine_LV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(241, "basicmachine.compressor.tier.01", "Basic Compressor", 1, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(242, "basicmachine.compressor.tier.02", "Advanced Compressor", 2, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(243, "basicmachine.compressor.tier.03", "Advanced Compressor II", 3, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(244, "basicmachine.compressor.tier.04", "Advanced Compressor III", 4, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(245, "basicmachine.compressor.tier.05", "Singularity Compressor", 5, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(246, "basicmachine.compressor.tier.06", "Singularity Compressor", 6, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(247, "basicmachine.compressor.tier.07", "Singularity Compressor", 7, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(248, "basicmachine.compressor.tier.08", "Singularity Compressor", 8, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - + ItemList.Machine_LV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(251, "basicmachine.cutter.tier.01", "Basic Cutting Machine", 1, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 1, 2, 1000, 0, 1, "Cutter.png", "", aBoolConst_0, aBoolConst_0, 0, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); ItemList.Machine_MV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(252, "basicmachine.cutter.tier.02", "Advanced Cutting Machine", 2, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 2, 1000, 0, 1, "Cutter2.png", "", aBoolConst_0, aBoolConst_0, 0, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); ItemList.Machine_HV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(253, "basicmachine.cutter.tier.03", "Advanced Cutting Machine II", 3, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 2, 1000, 0, 1, "Cutter2.png", "", aBoolConst_0, aBoolConst_0, 0, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); ItemList.Machine_EV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(254, "basicmachine.cutter.tier.04", "Advanced Cutting Machine III", 4, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 2, 1000, 0, 1, "Cutter2.png", "", aBoolConst_0, aBoolConst_0, 0, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); ItemList.Machine_IV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(255, "basicmachine.cutter.tier.05", "Advanced Cutting Machine IV", 5, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 2, 1000, 0, 1, "Cutter2.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(256, "basicmachine.cutter.tier.06", "Advanced Cutting Machine V", 6, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 1, 2, 1000, 0, 1, "Cutter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(257, "basicmachine.cutter.tier.07", "Advanced Cutting Machine VI", 7, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 1, 2, 1000, 0, 1, "Cutter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(258, "basicmachine.cutter.tier.08", "Advanced Cutting Machine VII", 8, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 1, 2, 1000, 0, 1, "Cutter.png", "", aBoolConst_0, aBoolConst_0, 0, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - + ItemList.Machine_LV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(261, "basicmachine.e_furnace.tier.01", "Basic Electric Furnace", 1, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_MV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(262, "basicmachine.e_furnace.tier.02", "Advanced Electric Furnace", 2, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_HV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(263, "basicmachine.e_furnace.tier.03", "Advanced Electric Furnace II", 3, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_EV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(264, "basicmachine.e_furnace.tier.04", "Advanced Electric Furnace III", 4, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_IV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(265, "basicmachine.e_furnace.tier.05", "Electron Exitement Processor", 5, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_LuV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(266, "basicmachine.e_furnace.tier.06", "Electron Exitement Processor", 6, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_ZPM_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(267, "basicmachine.e_furnace.tier.07", "Electron Exitement Processor", 7, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_UV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(268, "basicmachine.e_furnace.tier.08", "Electron Exitement Processor", 8, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - + ItemList.Machine_LV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(271, "basicmachine.extractor.tier.01", "Basic Extractor", 1, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(272, "basicmachine.extractor.tier.02", "Advanced Extractor", 2, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(273, "basicmachine.extractor.tier.03", "Advanced Extractor II", 3, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(274, "basicmachine.extractor.tier.04", "Advanced Extractor III", 4, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(275, "basicmachine.extractor.tier.05", "Vacuum Extractor", 5, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(276, "basicmachine.extractor.tier.06", "Vacuum Extractor", 6, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(277, "basicmachine.extractor.tier.07", "Vacuum Extractor", 7, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(278, "basicmachine.extractor.tier.08", "Vacuum Extractor", 8, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - + ItemList.Machine_LV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(281, "basicmachine.extruder.tier.01", "Basic Extruder", 1, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_MV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(282, "basicmachine.extruder.tier.02", "Advanced Extruder", 2, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_HV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(283, "basicmachine.extruder.tier.03", "Advanced Extruder II", 3, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_EV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(284, "basicmachine.extruder.tier.04", "Advanced Extruder III", 4, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_IV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(285, "basicmachine.extruder.tier.05", "Advanced Extruder IV", 5, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(286, "basicmachine.extruder.tier.06", "Advanced Extruder V", 6, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(287, "basicmachine.extruder.tier.07", "Advanced Extruder VI", 7, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(288, "basicmachine.extruder.tier.08", "Advanced Extruder VII", 8, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), aBoolConst_0, aBoolConst_0, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - + ItemList.Machine_LV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(291, "basicmachine.lathe.tier.01", "Basic Lathe", 1, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OrePrefixes.gem.get(Materials.Diamond)}).getStackForm(1L)); ItemList.Machine_MV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(292, "basicmachine.lathe.tier.02", "Advanced Lathe", 2, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OrePrefixes.gemFlawless.get(Materials.Diamond)}).getStackForm(1L)); ItemList.Machine_HV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(293, "basicmachine.lathe.tier.03", "Advanced Lathe II", 3, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); ItemList.Machine_EV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(294, "basicmachine.lathe.tier.04", "Advanced Lathe III", 4, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); ItemList.Machine_IV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(295, "basicmachine.lathe.tier.05", "Advanced Lathe IV", 5, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(296, "basicmachine.lathe.tier.06", "Advanced Lathe V", 6, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(297, "basicmachine.lathe.tier.07", "Advanced Lathe VI", 7, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(298, "basicmachine.lathe.tier.08", "Advanced Lathe VII", 8, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", "", aBoolConst_0, aBoolConst_0, 0, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); - + ItemList.Machine_LV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(301, "basicmachine.macerator.tier.01", "Basic Macerator", 1, "Schreddering your Ores", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 1, 0, 0, 1, "Macerator1.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "MACERATOR", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.gem.get(Materials.Diamond)}).getStackForm(1L)); - ItemList.Machine_MV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(302, "basicmachine.macerator.tier.02", "Advanced Macerator", 2, "Schreddering your Ores", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 1, 0, 0, 1, "Macerator1.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "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', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); + ItemList.Machine_MV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(302, "basicmachine.macerator.tier.02", "Advanced Macerator", 2, "Schreddering your Ores", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 1, 0, 0, 1, "Macerator1.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "MACERATOR", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.gemFlawless.get(Materials.Diamond)}).getStackForm(1L)); ItemList.Machine_HV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(303, "basicmachine.macerator.tier.03", "Universal Macerator", 3, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 2, 0, 0, 1, "Macerator2.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); ItemList.Machine_EV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(304, "basicmachine.macerator.tier.04", "Universal Pulverizer", 4, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 3, 0, 0, 1, "Macerator3.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); ItemList.Machine_IV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(305, "basicmachine.macerator.tier.05", "Blend-O-Matic 9001", 5, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 4, 0, 0, 1, "Macerator4.png", GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "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_LuV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(306, "basicmachine.macerator.tier.06", "Blend-O-Matic 9001", 6, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 4, 0, 0, 1, "Macerator4.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "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_ZPM_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(307, "basicmachine.macerator.tier.07", "Blend-O-Matic 9001", 7, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 4, 0, 0, 1, "Macerator4.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "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_UV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(308, "basicmachine.macerator.tier.08", "Blend-O-Matic 9001", 8, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 4, 0, 0, 1, "Macerator4.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(201)), aBoolConst_0, aBoolConst_0, 1, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); - + ItemList.Machine_LV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(311, "basicmachine.microwave.tier.01", "Basic Microwave", 1, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); ItemList.Machine_MV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(312, "basicmachine.microwave.tier.02", "Advanced Microwave", 2, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); ItemList.Machine_HV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(313, "basicmachine.microwave.tier.03", "Advanced Microwave II", 3, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); ItemList.Machine_EV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(314, "basicmachine.microwave.tier.04", "Advanced Microwave III", 4, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); ItemList.Machine_IV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(315, "basicmachine.microwave.tier.05", "Advanced Microwave IV", 5, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(316, "basicmachine.microwave.tier.06", "Advanced Microwave V", 6, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(317, "basicmachine.microwave.tier.07", "Advanced Microwave VI", 7, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(318, "basicmachine.microwave.tier.08", "Advanced Microwave VII", 8, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - + ItemList.Machine_LV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(321, "basicmachine.printer.tier.01", "Basic Printer", 1, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 1, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(322, "basicmachine.printer.tier.02", "Advanced Printer", 2, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 1, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(323, "basicmachine.printer.tier.03", "Advanced Printer II", 3, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 1, "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)); @@ -656,72 +579,48 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Machine_HV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(333, "basicmachine.recycler.tier.03", "Advanced Recycler II", 3, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); ItemList.Machine_EV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(334, "basicmachine.recycler.tier.04", "Advanced Recycler III", 4, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); ItemList.Machine_IV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(335, "basicmachine.recycler.tier.05", "The Oblitterator", 5, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(336, "basicmachine.recycler.tier.06", "The Oblitterator", 6, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(337, "basicmachine.recycler.tier.07", "The Oblitterator", 7, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(338, "basicmachine.recycler.tier.08", "The Oblitterator", 8, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - + ItemList.Machine_LV_Scanner.set(new GT_MetaTileEntity_Scanner(341, "basicmachine.scanner.tier.01", "Basic Scanner", 1).getStackForm(1L)); ItemList.Machine_MV_Scanner.set(new GT_MetaTileEntity_Scanner(342, "basicmachine.scanner.tier.02", "Advanced Scanner", 2).getStackForm(1L)); ItemList.Machine_HV_Scanner.set(new GT_MetaTileEntity_Scanner(343, "basicmachine.scanner.tier.03", "Advanced Scanner II", 3).getStackForm(1L)); ItemList.Machine_EV_Scanner.set(new GT_MetaTileEntity_Scanner(344, "basicmachine.scanner.tier.04", "Advanced Scanner III", 4).getStackForm(1L)); ItemList.Machine_IV_Scanner.set(new GT_MetaTileEntity_Scanner(345, "basicmachine.scanner.tier.05", "Advanced Scanner IV", 5).getStackForm(1L)); - //ItemList.Machine_LuV_Scanner.set(new GT_MetaTileEntity_Scanner(346, "basicmachine.scanner.tier.06", "Advanced Scanner V", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_Scanner.set(new GT_MetaTileEntity_Scanner(347, "basicmachine.scanner.tier.07", "Advanced Scanner VI", 7).getStackForm(1L)); - //ItemList.Machine_UV_Scanner.set(new GT_MetaTileEntity_Scanner(348, "basicmachine.scanner.tier.08", "Advanced Scanner VII", 8).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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_LuV, 'T', ItemList.Emitter_LuV, 'R', ItemList.Sensor_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt01.get(Materials.VanadiumGallium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_ZPM, 'T', ItemList.Emitter_ZPM, 'R', ItemList.Sensor_ZPM, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt01.get(Materials.Naquadah)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_UV, 'T', ItemList.Emitter_UV, 'R', ItemList.Sensor_UV, 'C', OrePrefixes.circuit.get(Materials.Infinite), 'W', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy)}); ItemList.Machine_LV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(351, "basicmachine.wiremill.tier.01", "Basic Wiremill", 1, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(352, "basicmachine.wiremill.tier.02", "Advanced Wiremill", 2, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(353, "basicmachine.wiremill.tier.03", "Advanced Wiremill II", 3, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(354, "basicmachine.wiremill.tier.04", "Advanced Wiremill III", 4, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(355, "basicmachine.wiremill.tier.05", "Advanced Wiremill IV", 5, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(356, "basicmachine.wiremill.tier.06", "Advanced Wiremill V", 6, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(357, "basicmachine.wiremill.tier.07", "Advanced Wiremill VI", 7, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(358, "basicmachine.wiremill.tier.08", "Advanced Wiremill VII", 8, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(204)), aBoolConst_0, aBoolConst_0, 0, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(361, "basicmachine.centrifuge.tier.01", "Basic Centrifuge", 1, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(362, "basicmachine.centrifuge.tier.02", "Advanced Centrifuge", 2, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(363, "basicmachine.centrifuge.tier.03", "Turbo Centrifuge", 3, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(364, "basicmachine.centrifuge.tier.04", "Molecular Separator", 4, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(365, "basicmachine.centrifuge.tier.05", "Molecular Cyclone", 5, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(366, "basicmachine.centrifuge.tier.06", "Molecular Cyclone", 6, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(367, "basicmachine.centrifuge.tier.07", "Molecular Cyclone", 7, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(368, "basicmachine.centrifuge.tier.08", "Molecular Cyclone", 8, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(371, "basicmachine.electrolyzer.tier.01", "Basic Electrolyzer", 1, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Gold), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(372, "basicmachine.electrolyzer.tier.02", "Advanced Electrolyzer", 2, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Silver), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(373, "basicmachine.electrolyzer.tier.03", "Advanced Electrolyzer II", 3, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Electrum), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(374, "basicmachine.electrolyzer.tier.04", "Advanced Electrolyzer III", 4, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Platinum), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(375, "basicmachine.electrolyzer.tier.05", "Molecular Disintegrator E-4908", 5, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(376, "basicmachine.electrolyzer.tier.06", "Molecular Disintegrator E-4908", 6, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "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.Osmium), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - //ItemList.Machine_ZPM_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(377, "basicmachine.electrolyzer.tier.07", "Molecular Disintegrator E-4908", 7, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "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.Osmium), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - //ItemList.Machine_UV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(378, "basicmachine.electrolyzer.tier.08", "Molecular Disintegrator E-4908", 8, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", "", aBoolConst_0, aBoolConst_0, 0, "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.Osmium), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(381, "basicmachine.thermalcentrifuge.tier.01", "Basic Thermal Centrifuge", 1, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_MV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(382, "basicmachine.thermalcentrifuge.tier.02", "Advanced Thermal Centrifuge", 2, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_HV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(383, "basicmachine.thermalcentrifuge.tier.03", "Advanced Thermal Centrifuge II", 3, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_EV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(384, "basicmachine.thermalcentrifuge.tier.04", "Advanced Thermal Centrifuge III", 4, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_IV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(385, "basicmachine.thermalcentrifuge.tier.05", "Blaze Sweatshop T-6350", 5, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(386, "basicmachine.thermalcentrifuge.tier.06", "Blaze Sweatshop T-6350", 6, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(387, "basicmachine.thermalcentrifuge.tier.07", "Blaze Sweatshop T-6350", 7, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(388, "basicmachine.thermalcentrifuge.tier.08", "Blaze Sweatshop T-6350", 8, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", "", aBoolConst_0, aBoolConst_0, 0, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); ItemList.Machine_LV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(391, "basicmachine.orewasher.tier.01", "Basic Ore Washing Plant", 1, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 16000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); ItemList.Machine_MV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(392, "basicmachine.orewasher.tier.02", "Advanced Ore Washing Plant", 2, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 24000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); ItemList.Machine_HV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(393, "basicmachine.orewasher.tier.03", "Advanced Ore Washing Plant II", 3, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 32000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); ItemList.Machine_EV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(394, "basicmachine.orewasher.tier.04", "Advanced Ore Washing Plant III", 4, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 40000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); ItemList.Machine_IV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(395, "basicmachine.orewasher.tier.05", "Repurposed Laundry-Washer I-360", 5, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 48000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(396, "basicmachine.orewasher.tier.06", "Repurposed Laundry-Washer I-360", 6, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 16000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "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.GLASS}).getStackForm(1L)); - //ItemList.Machine_ZPM_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(397, "basicmachine.orewasher.tier.07", "Repurposed Laundry-Washer I-360", 7, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 16000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "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.GLASS}).getStackForm(1L)); - //ItemList.Machine_UV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(398, "basicmachine.orewasher.tier.08", "Repurposed Laundry-Washer I-360", 8, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 16000, 0, 1, "OreWasher.png", "", aBoolConst_0, aBoolConst_0, 0, "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.GLASS}).getStackForm(1L)); ItemList.Machine_LV_Boxinator.set(new GT_MetaTileEntity_Boxinator(401, "basicmachine.boxinator.tier.01", "Basic Packager", 1).getStackForm(1L)); ItemList.Machine_MV_Boxinator.set(new GT_MetaTileEntity_Boxinator(402, "basicmachine.boxinator.tier.02", "Advanced Packager", 2).getStackForm(1L)); @@ -755,279 +654,186 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Machine_HV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(423, "basicmachine.chemicalreactor.tier.03", "Advanced Chemical Reactor II", 3, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); ItemList.Machine_EV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(424, "basicmachine.chemicalreactor.tier.04", "Advanced Chemical Reactor III", 4, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeLarge.get(Materials.Plastic)}).getStackForm(1L)); ItemList.Machine_IV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(425, "basicmachine.chemicalreactor.tier.05", "Advanced Chemical Reactor IV", 5, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(426, "basicmachine.chemicalreactor.tier.06", "Advanced Chemical Reactor V", 6, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(427, "basicmachine.chemicalreactor.tier.07", "Advanced Chemical Reactor VI", 7, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_UV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(428, "basicmachine.chemicalreactor.tier.08", "Advanced Chemical Reactor VII", 8, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); ItemList.Machine_LV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(431, "basicmachine.fluidcanner.tier.01", "Basic Fluid Canner", 1, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 16000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(432, "basicmachine.fluidcanner.tier.02", "Advanced Fluid Canner", 2, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 32000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(433, "basicmachine.fluidcanner.tier.03", "Quick Fluid Canner", 3, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 48000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(434, "basicmachine.fluidcanner.tier.04", "Turbo Fluid Canner", 4, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 64000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(435, "basicmachine.fluidcanner.tier.05", "Instant Fluid Canner", 5, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 80000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "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_LuV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(436, "basicmachine.fluidcanner.tier.06", "Instant Fluid Canner", 6, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 80000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "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_ZPM_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(437, "basicmachine.fluidcanner.tier.07", "Instant Fluid Canner", 7, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 80000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "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_UV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(438, "basicmachine.fluidcanner.tier.08", "Instant Fluid Canner", 8, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 80000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(441, "basicmachine.rockbreaker.tier.01", "Basic Rock Breaker", 1).getStackForm(1L)); ItemList.Machine_MV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(442, "basicmachine.rockbreaker.tier.02", "Advanced Rock Breaker", 2).getStackForm(1L)); ItemList.Machine_HV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(443, "basicmachine.rockbreaker.tier.03", "Advanced Rock Breaker II", 3).getStackForm(1L)); ItemList.Machine_EV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(444, "basicmachine.rockbreaker.tier.04", "Advanced Rock Breaker III", 4).getStackForm(1L)); ItemList.Machine_IV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(445, "basicmachine.rockbreaker.tier.05", "Cryogenic Magma Solidifier R-8200", 5).getStackForm(1L)); - //ItemList.Machine_LuV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(446, "basicmachine.rockbreaker.tier.06", "Cryogenic Magma Solidifier R-8200", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(447, "basicmachine.rockbreaker.tier.07", "Cryogenic Magma Solidifier R-8200", 7).getStackForm(1L)); - //ItemList.Machine_UV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(448, "basicmachine.rockbreaker.tier.08", "Cryogenic Magma Solidifier R-8200", 8).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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_LuV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_LuV, 'P', ItemList.Electric_Piston_LuV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'G', Ic2Items.reinforcedGlass}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_ZPM, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_ZPM, 'P', ItemList.Electric_Piston_ZPM, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt01.get(Materials.Naquadah), 'G', Ic2Items.reinforcedGlass}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_UV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_UV, 'P', ItemList.Electric_Piston_UV, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'G', Ic2Items.reinforcedGlass}); ItemList.Machine_LV_Disassembler.set(new GT_MetaTileEntity_Disassembler(451, "basicmachine.disassembler.tier.01", "Basic Disassembler", 1).getStackForm(1L)); ItemList.Machine_MV_Disassembler.set(new GT_MetaTileEntity_Disassembler(452, "basicmachine.disassembler.tier.02", "Advanced Disassembler", 2).getStackForm(1L)); ItemList.Machine_HV_Disassembler.set(new GT_MetaTileEntity_Disassembler(453, "basicmachine.disassembler.tier.03", "Advanced Disassembler II", 3).getStackForm(1L)); ItemList.Machine_EV_Disassembler.set(new GT_MetaTileEntity_Disassembler(454, "basicmachine.disassembler.tier.04", "Advanced Disassembler III", 4).getStackForm(1L)); ItemList.Machine_IV_Disassembler.set(new GT_MetaTileEntity_Disassembler(455, "basicmachine.disassembler.tier.05", "Advanced Disassembler IV", 5).getStackForm(1L)); - //ItemList.Machine_LuV_Disassembler.set(new GT_MetaTileEntity_Disassembler(456, "basicmachine.disassembler.tier.06", "Advanced Disassembler V", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_Disassembler.set(new GT_MetaTileEntity_Disassembler(457, "basicmachine.disassembler.tier.07", "Advanced Disassembler VI", 7).getStackForm(1L)); - //ItemList.Machine_UV_Disassembler.set(new GT_MetaTileEntity_Disassembler(458, "basicmachine.disassembler.tier.08", "Advanced Disassembler VII", 8).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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_LuV, 'A', ItemList.Robot_Arm_LuV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.VanadiumGallium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_ZPM, 'A', ItemList.Robot_Arm_ZPM, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt01.get(Materials.Naquadah)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_UV, 'A', ItemList.Robot_Arm_UV, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy)}); ItemList.Machine_LV_Massfab.set(new GT_MetaTileEntity_Massfabricator(461, "basicmachine.massfab.tier.01", "Basic Mass Fabricator", 1).getStackForm(1L)); ItemList.Machine_MV_Massfab.set(new GT_MetaTileEntity_Massfabricator(462, "basicmachine.massfab.tier.02", "Advanced Mass Fabricator", 2).getStackForm(1L)); ItemList.Machine_HV_Massfab.set(new GT_MetaTileEntity_Massfabricator(463, "basicmachine.massfab.tier.03", "Advanced Mass Fabricator II", 3).getStackForm(1L)); ItemList.Machine_EV_Massfab.set(new GT_MetaTileEntity_Massfabricator(464, "basicmachine.massfab.tier.04", "Advanced Mass Fabricator III", 4).getStackForm(1L)); ItemList.Machine_IV_Massfab.set(new GT_MetaTileEntity_Massfabricator(465, "basicmachine.massfab.tier.05", "Advanced Mass Fabricator IV", 5).getStackForm(1L)); - //ItemList.Machine_LuV_Massfab.set(new GT_MetaTileEntity_Massfabricator(466, "basicmachine.massfab.tier.06", "Advanced Mass Fabricator V", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_Massfab.set(new GT_MetaTileEntity_Massfabricator(467, "basicmachine.massfab.tier.07", "Advanced Mass Fabricator VI", 7).getStackForm(1L)); - //ItemList.Machine_UV_Massfab.set(new GT_MetaTileEntity_Massfabricator(468, "basicmachine.massfab.tier.08", "Advanced Mass Fabricator VII", 8).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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.VanadiumGallium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_ZPM, 'F', ItemList.Field_Generator_ZPM, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt04.get(Materials.Naquadah)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_UV, 'F', ItemList.Field_Generator_UV, 'C', OrePrefixes.circuit.get(Materials.Infinite), 'W', OrePrefixes.cableGt04.get(Materials.NaquadahAlloy)}); ItemList.Machine_LV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(471, "basicmachine.amplifab.tier.01", "Basic Amplifabricator", 1, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); ItemList.Machine_MV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(472, "basicmachine.amplifab.tier.02", "Advanced Amplifabricator", 2, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); ItemList.Machine_HV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(473, "basicmachine.amplifab.tier.03", "Advanced Amplifabricator II", 3, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); ItemList.Machine_EV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(474, "basicmachine.amplifab.tier.04", "Advanced Amplifabricator III", 4, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); ItemList.Machine_IV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(475, "basicmachine.amplifab.tier.05", "Advanced Amplifabricator IV", 5, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(476, "basicmachine.amplifab.tier.06", "Advanced Amplifabricator IV", 6, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(477, "basicmachine.amplifab.tier.07", "Advanced Amplifabricator IV", 7, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(478, "basicmachine.amplifab.tier.08", "Advanced Amplifabricator IV", 8, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); ItemList.Machine_LV_Replicator.set(new GT_MetaTileEntity_Replicator(481, "basicmachine.replicator.tier.01", "Basic Replicator", 1).getStackForm(1L)); ItemList.Machine_MV_Replicator.set(new GT_MetaTileEntity_Replicator(482, "basicmachine.replicator.tier.02", "Advanced Replicator", 2).getStackForm(1L)); ItemList.Machine_HV_Replicator.set(new GT_MetaTileEntity_Replicator(483, "basicmachine.replicator.tier.03", "Advanced Replicator II", 3).getStackForm(1L)); ItemList.Machine_EV_Replicator.set(new GT_MetaTileEntity_Replicator(484, "basicmachine.replicator.tier.04", "Advanced Replicator III", 4).getStackForm(1L)); ItemList.Machine_IV_Replicator.set(new GT_MetaTileEntity_Replicator(485, "basicmachine.replicator.tier.05", "Advanced Replicator IV", 5).getStackForm(1L)); - //ItemList.Machine_LuV_Replicator.set(new GT_MetaTileEntity_Replicator(486, "basicmachine.replicator.tier.06", "Advanced Replicator V", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_Replicator.set(new GT_MetaTileEntity_Replicator(487, "basicmachine.replicator.tier.07", "Advanced Replicator VI", 7).getStackForm(1L)); - //ItemList.Machine_UV_Replicator.set(new GT_MetaTileEntity_Replicator(488, "basicmachine.replicator.tier.08", "Advanced Replicator VII", 8).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_LuV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'E', ItemList.Emitter_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.VanadiumGallium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_ZPM, 'F', ItemList.Field_Generator_ZPM, 'E', ItemList.Emitter_ZPM, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt04.get(Materials.Naquadah)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_UV, 'F', ItemList.Field_Generator_UV, 'E', ItemList.Emitter_UV, 'C', OrePrefixes.circuit.get(Materials.Infinite), 'W', OrePrefixes.cableGt04.get(Materials.NaquadahAlloy)}); ItemList.Machine_LV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(491, "basicmachine.brewery.tier.01", "Basic Brewery", 1).getStackForm(1L)); ItemList.Machine_MV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(492, "basicmachine.brewery.tier.02", "Advanced Brewery", 2).getStackForm(1L)); ItemList.Machine_HV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(493, "basicmachine.brewery.tier.03", "Advanced Brewery II", 3).getStackForm(1L)); ItemList.Machine_EV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(494, "basicmachine.brewery.tier.04", "Advanced Brewery III", 4).getStackForm(1L)); ItemList.Machine_IV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(495, "basicmachine.brewery.tier.05", "Advanced Brewery IV", 5).getStackForm(1L)); - //ItemList.Machine_LuV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(496, "basicmachine.brewery.tier.06", "Advanced Brewery V", 6).getStackForm(1L)); - //ItemList.Machine_ZPM_Brewery.set(new GT_MetaTileEntity_PotionBrewer(497, "basicmachine.brewery.tier.07", "Advanced Brewery VI", 7).getStackForm(1L)); - //ItemList.Machine_UV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(498, "basicmachine.brewery.tier.08", "Advanced Brewery VII", 8).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)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_LuV, 'P', ItemList.Electric_Pump_LuV, 'B', new ItemStack(Items.brewing_stand, 0, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'G', Ic2Items.reinforcedGlass}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_ZPM, 'P', ItemList.Electric_Pump_ZPM, 'B', new ItemStack(Items.brewing_stand, 0, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt01.get(Materials.Naquadah), 'G', Ic2Items.reinforcedGlass}); - //GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_UV, 'P', ItemList.Electric_Pump_UV, 'B', new ItemStack(Items.brewing_stand, 0, 'C', OrePrefixes.circuit.get(Materials.Superconductor), 'W', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'G', Ic2Items.reinforcedGlass}); ItemList.Machine_LV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(501, "basicmachine.fermenter.tier.01", "Basic Fermenter", 1, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(502, "basicmachine.fermenter.tier.02", "Advanced Fermenter", 2, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(503, "basicmachine.fermenter.tier.03", "Advanced Fermenter II", 3, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(504, "basicmachine.fermenter.tier.04", "Advanced Fermenter III", 4, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(505, "basicmachine.fermenter.tier.05", "Advanced Fermenter IV", 5, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(506, "basicmachine.fermenter.tier.06", "Advanced Fermenter V", 6, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(507, "basicmachine.fermenter.tier.07", "Advanced Fermenter VI", 7, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(508, "basicmachine.fermenter.tier.08", "Advanced Fermenter VII", 8, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", "", aBoolConst_0, aBoolConst_0, 0, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(511, "basicmachine.fluidextractor.tier.01", "Basic Fluid Extractor", 1, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(512, "basicmachine.fluidextractor.tier.02", "Advanced Fluid Extractor", 2, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(513, "basicmachine.fluidextractor.tier.03", "Advanced Fluid Extractor II", 3, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(514, "basicmachine.fluidextractor.tier.04", "Advanced Fluid Extractor III", 4, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(515, "basicmachine.fluidextractor.tier.05", "Advanced Fluid Extractor IV", 5, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_LuV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(516, "basicmachine.fluidextractor.tier.06", "Advanced Fluid Extractor V", 6, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_ZPM_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(517, "basicmachine.fluidextractor.tier.07", "Advanced Fluid Extractor VI", 7, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_UV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(518, "basicmachine.fluidextractor.tier.08", "Advanced Fluid Extractor VII", 8, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "FLUID_EXTRACTOR", new Object[]{"GCG", "PME", 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_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(521, "basicmachine.fluidsolidifier.tier.01", "Basic Fluid Solidifier", 1, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_MV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(522, "basicmachine.fluidsolidifier.tier.02", "Advanced Fluid Solidifier", 2, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_HV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(523, "basicmachine.fluidsolidifier.tier.03", "Advanced Fluid Solidifier II", 3, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_EV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(524, "basicmachine.fluidsolidifier.tier.04", "Advanced Fluid Solidifier III", 4, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_IV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(525, "basicmachine.fluidsolidifier.tier.05", "Advanced Fluid Solidifier IV", 5, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(526, "basicmachine.fluidsolidifier.tier.06", "Advanced Fluid Solidifier V", 6, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(527, "basicmachine.fluidsolidifier.tier.07", "Advanced Fluid Solidifier VI", 7, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(528, "basicmachine.fluidsolidifier.tier.08", "Advanced Fluid Solidifier VII", 8, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_LV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(531, "basicmachine.distillery.tier.01", "Basic Distillery", 1, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 1000, 0, 1, "Distillery.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(532, "basicmachine.distillery.tier.02", "Advanced Distillery", 2, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 1000, 0, 1, "Distillery.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(533, "basicmachine.distillery.tier.03", "Advanced Distillery II", 3, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 1000, 0, 1, "Distillery.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(534, "basicmachine.distillery.tier.04", "Advanced Distillery III", 4, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 1000, 0, 1, "Distillery.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(535, "basicmachine.distillery.tier.05", "Advanced Distillery IV", 5, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 1000, 0, 1, "Distillery.png", GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(536, "basicmachine.distillery.tier.06", "Advanced Distillery V", 6, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 0, 1000, 0, 1, "Distillery.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(537, "basicmachine.distillery.tier.07", "Advanced Distillery VI", 7, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 0, 1000, 0, 1, "Distillery.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(538, "basicmachine.distillery.tier.08", "Advanced Distillery VII", 8, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 0, 1000, 0, 1, "Distillery.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(541, "basicmachine.chemicalbath.tier.01", "Basic Chemical Bath", 1, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(542, "basicmachine.chemicalbath.tier.02", "Advanced Chemical Bath", 2, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(543, "basicmachine.chemicalbath.tier.03", "Advanced Chemical Bath II", 3, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(544, "basicmachine.chemicalbath.tier.04", "Advanced Chemical Bath III", 4, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(545, "basicmachine.chemicalbath.tier.05", "Advanced Chemical Bath IV", 5, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "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_LuV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(546, "basicmachine.chemicalbath.tier.06", "Advanced Chemical Bath V", 6, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "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_ZPM_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(547, "basicmachine.chemicalbath.tier.07", "Advanced Chemical Bath VI", 7, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "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_UV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(548, "basicmachine.chemicalbath.tier.08", "Advanced Chemical Bath VII", 8, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", "", aBoolConst_0, true, 0, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(551, "basicmachine.polarizer.tier.01", "Basic Polarizer", 1, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(552, "basicmachine.polarizer.tier.02", "Advanced Polarizer", 2, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(553, "basicmachine.polarizer.tier.03", "Advanced Polarizer II", 3, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(554, "basicmachine.polarizer.tier.04", "Advanced Polarizer III", 4, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(555, "basicmachine.polarizer.tier.05", "Advanced Polarizer IV", 5, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(556, "basicmachine.polarizer.tier.06", "Advanced Polarizer V", 6, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(557, "basicmachine.polarizer.tier.07", "Advanced Polarizer VI", 7, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(558, "basicmachine.polarizer.tier.08", "Advanced Polarizer VII", 8, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(561, "basicmachine.electromagneticseparator.tier.01", "Basic Electromagnetic Separator", 1, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(562, "basicmachine.electromagneticseparator.tier.02", "Advanced Electromagnetic Separator", 2, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(563, "basicmachine.electromagneticseparator.tier.03", "Advanced Electromagnetic Separator II", 3, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(564, "basicmachine.electromagneticseparator.tier.04", "Advanced Electromagnetic Separator III", 4, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(565, "basicmachine.electromagneticseparator.tier.05", "Advanced Electromagnetic Separator IV", 5, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(566, "basicmachine.electromagneticseparator.tier.06", "Advanced Electromagnetic Separator V", 6, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(567, "basicmachine.electromagneticseparator.tier.07", "Advanced Electromagnetic Separator VI", 7, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_UV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(568, "basicmachine.electromagneticseparator.tier.08", "Advanced Electromagnetic Separator VII", 8, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(571, "basicmachine.autoclave.tier.01", "Basic Autoclave", 1, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(572, "basicmachine.autoclave.tier.02", "Advanced Autoclave", 2, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(573, "basicmachine.autoclave.tier.03", "Advanced Autoclave II", 3, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(574, "basicmachine.autoclave.tier.04", "Advanced Autoclave III", 4, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(575, "basicmachine.autoclave.tier.05", "Advanced Autoclave IV", 5, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(576, "basicmachine.autoclave.tier.06", "Advanced Autoclave V", 6, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 1, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(577, "basicmachine.autoclave.tier.07", "Advanced Autoclave VI", 7, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 1, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(578, "basicmachine.autoclave.tier.08", "Advanced Autoclave VII", 8, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 1, 1, 8000, 0, 1, "Autoclave.png", "", aBoolConst_0, aBoolConst_0, 0, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(581, "basicmachine.mixer.tier.01", "Basic Mixer", 1, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 1, 16000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(582, "basicmachine.mixer.tier.02", "Advanced Mixer", 2, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 1, 32000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(583, "basicmachine.mixer.tier.03", "Advanced Mixer II", 3, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 1, 48000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(584, "basicmachine.mixer.tier.04", "Advanced Mixer III", 4, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 9, 1, 64000, 0, 1, "Mixer2.png", "", aBoolConst_0, aBoolConst_0, 0, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(585, "basicmachine.mixer.tier.05", "Advanced Mixer IV", 5, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 9, 1, 64000, 0, 1, "Mixer2.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(586, "basicmachine.mixer.tier.06", "Advanced Mixer V", 6, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 4, 1, 8000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(587, "basicmachine.mixer.tier.07", "Advanced Mixer VI", 7, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 4, 1, 8000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(588, "basicmachine.mixer.tier.08", "Advanced Mixer VII", 8, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 4, 1, 8000, 0, 1, "Mixer.png", "", aBoolConst_0, aBoolConst_0, 0, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(591, "basicmachine.laserengraver.tier.01", "Basic Precision Laser Engraver", 1, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(592, "basicmachine.laserengraver.tier.02", "Advanced Precision Laser Engraver", 2, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(593, "basicmachine.laserengraver.tier.03", "Advanced Precision Laser Engraver II", 3, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(594, "basicmachine.laserengraver.tier.04", "Advanced Precision Laser Engraver III", 4, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(595, "basicmachine.laserengraver.tier.05", "Advanced Precision Laser Engraver IV", 5, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(596, "basicmachine.laserengraver.tier.06", "Advanced Precision Laser Engraver V", 6, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(597, "basicmachine.laserengraver.tier.07", "Advanced Precision Laser Engraver VI", 7, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "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_UV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(598, "basicmachine.laserengraver.tier.08", "Advanced Precision Laser Engraver VII", 8, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 0, 0, 1, "LaserEngraver.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), aBoolConst_0, aBoolConst_0, 0, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(601, "basicmachine.press.tier.01", "Basic Forming Press", 1, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(602, "basicmachine.press.tier.02", "Advanced Forming Press", 2, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(603, "basicmachine.press.tier.03", "Advanced Forming Press II", 3, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(604, "basicmachine.press.tier.04", "Advanced Forming Press III", 4, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(605, "basicmachine.press.tier.05", "Advanced Forming Press IV", 5, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(606, "basicmachine.press.tier.06", "Advanced Forming Press V", 6, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(607, "basicmachine.press.tier.07", "Advanced Forming Press VI", 7, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(608, "basicmachine.press.tier.08", "Advanced Forming Press VII", 8, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(203)), aBoolConst_0, aBoolConst_0, 0, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(611, "basicmachine.hammer.tier.01", "Basic Forge Hammer", 1, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); ItemList.Machine_MV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(612, "basicmachine.hammer.tier.02", "Advanced Forge Hammer", 2, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); ItemList.Machine_HV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(613, "basicmachine.hammer.tier.03", "Advanced Forge Hammer II", 3, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); ItemList.Machine_EV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(614, "basicmachine.hammer.tier.04", "Advanced Forge Hammer III", 4, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); ItemList.Machine_IV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(615, "basicmachine.hammer.tier.05", "Advanced Forge Hammer IV", 5, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(616, "basicmachine.hammer.tier.06", "Advanced Forge Hammer V", 6, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(617, "basicmachine.hammer.tier.07", "Advanced Forge Hammer VI", 7, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "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_UV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(618, "basicmachine.hammer.tier.08", "Advanced Forge Hammer VII", 8, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), aBoolConst_0, aBoolConst_0, 0, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); ItemList.Machine_LV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(621, "basicmachine.fluidheater.tier.01", "Basic Fluid Heater", 1, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(622, "basicmachine.fluidheater.tier.02", "Advanced Fluid Heater", 2, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_HV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(623, "basicmachine.fluidheater.tier.03", "Advanced Fluid Heater II", 3, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_EV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(624, "basicmachine.fluidheater.tier.04", "Advanced Fluid Heater III", 4, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_IV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(625, "basicmachine.fluidheater.tier.05", "Advanced Fluid Heater IV", 5, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(626, "basicmachine.fluidheater.tier.06", "Advanced Fluid Heater V", 6, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(627, "basicmachine.fluidheater.tier.07", "Advanced Fluid Heater VI", 7, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(628, "basicmachine.fluidheater.tier.08", "Advanced Fluid Heater VII", 8, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", "", aBoolConst_0, aBoolConst_0, 0, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_LV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(631, "basicmachine.slicer.tier.01", "Basic Slicing Machine", 1, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(632, "basicmachine.slicer.tier.02", "Advanced Slicing Machine", 2, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(633, "basicmachine.slicer.tier.03", "Advanced Slicing Machine II", 3, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(634, "basicmachine.slicer.tier.04", "Advanced Slicing Machine III", 4, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(635, "basicmachine.slicer.tier.05", "Advanced Slicing Machine IV", 5, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(636, "basicmachine.slicer.tier.06", "Advanced Slicing Machine V", 6, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(637, "basicmachine.slicer.tier.07", "Advanced Slicing Machine VI", 7, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(638, "basicmachine.slicer.tier.08", "Advanced Slicing Machine VII", 8, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", "", aBoolConst_0, aBoolConst_0, 0, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(641, "basicmachine.sifter.tier.01", "Basic Sifting Machine", 1, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_MV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(642, "basicmachine.sifter.tier.02", "Advanced Sifting Machine", 2, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_HV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(643, "basicmachine.sifter.tier.03", "Advanced Sifting Machine II", 3, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_EV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(644, "basicmachine.sifter.tier.04", "Advanced Sifting Machine III", 4, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_IV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(645, "basicmachine.sifter.tier.05", "Advanced Sifting Machine IV", 5, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_LuV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(646, "basicmachine.sifter.tier.06", "Advanced Sifting Machine V", 6, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_ZPM_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(647, "basicmachine.sifter.tier.07", "Advanced Sifting Machine VI", 7, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "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_UV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(648, "basicmachine.sifter.tier.08", "Advanced Sifting Machine VII", 8, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 0, 2, 5, "Sifter.png", "", aBoolConst_0, aBoolConst_0, 0, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); ItemList.Machine_LV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(651, "basicmachine.arcfurnace.tier.01", "Basic Arc Furnace", 1, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 16000, 0, 1, "ArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_MV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(652, "basicmachine.arcfurnace.tier.02", "Advanced Arc Furnace", 2, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 24000, 0, 1, "ArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_HV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(653, "basicmachine.arcfurnace.tier.03", "Advanced Arc Furnace II", 3, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 32000, 0, 1, "ArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_EV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(654, "basicmachine.arcfurnace.tier.04", "Advanced Arc Furnace III", 4, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 48000, 0, 1, "ArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_IV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(655, "basicmachine.arcfurnace.tier.05", "Advanced Arc Furnace IV", 5, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 64000, 0, 1, "ArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(656, "basicmachine.arcfurnace.tier.06", "Advanced Arc Furnace V", 6, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 16000, 0, 1, "ArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(657, "basicmachine.arcfurnace.tier.07", "Advanced Arc Furnace VI", 7, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 16000, 0, 1, "ArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_UV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(658, "basicmachine.arcfurnace.tier.08", "Advanced Arc Furnace VII", 8, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 16000, 0, 1, "ArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_LV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(661, "basicmachine.plasmaarcfurnace.tier.01", "Basic Plasma Arc Furnace", 1, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 1000, 0, 1, "PlasmaArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_MV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(662, "basicmachine.plasmaarcfurnace.tier.02", "Advanced Plasma Arc Furnace", 2, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 2000, 0, 1, "PlasmaArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_HV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(663, "basicmachine.plasmaarcfurnace.tier.03", "Advanced Plasma Arc Furnace II", 3, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 4000, 0, 1, "PlasmaArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_EV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(664, "basicmachine.plasmaarcfurnace.tier.04", "Advanced Plasma Arc Furnace III", 4, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 8000, 0, 1, "PlasmaArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_IV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(665, "basicmachine.plasmaarcfurnace.tier.05", "Advanced Plasma Arc Furnace IV", 5, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 16000, 0, 1, "PlasmaArcFurnace.png", GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_LuV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(666, "basicmachine.plasmaarcfurnace.tier.06", "Advanced Plasma Arc Furnace V", 6, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 1000, 0, 1, "PlasmaArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_ZPM_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(667, "basicmachine.plasmaarcfurnace.tier.07", "Advanced Plasma Arc Furnace VI", 7, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 1000, 0, 1, "PlasmaArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "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_UV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(668, "basicmachine.plasmaarcfurnace.tier.08", "Advanced Plasma Arc Furnace VII", 8, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 1000, 0, 1, "PlasmaArcFurnace.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(202)), aBoolConst_0, aBoolConst_0, 0, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); ItemList.Machine_LV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(671, "basicmachine.e_oven.tier.01", "Basic Electric Oven", 1, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_MV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(672, "basicmachine.e_oven.tier.02", "Advanced Electric Oven", 2, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_HV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(673, "basicmachine.e_oven.tier.03", "Advanced Electric Oven II", 3, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_EV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(674, "basicmachine.e_oven.tier.04", "Advanced Electric Oven III", 4, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_IV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(675, "basicmachine.e_oven.tier.05", "Advanced Electric Oven IV", 5, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_LuV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(676, "basicmachine.e_oven.tier.06", "Advanced Electric Oven V", 6, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_ZPM_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(677, "basicmachine.e_oven.tier.07", "Advanced Electric Oven VI", 7, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - //ItemList.Machine_UV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(678, "basicmachine.e_oven.tier.08", "Advanced Electric Oven VII", 8, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); ItemList.Machine_LV_Miner.set(new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic Miner", 1).getStackForm(1L)); ItemList.Machine_MV_Miner.set(new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Good Miner", 2).getStackForm(1L)); @@ -1088,11 +894,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_NaquadahReactor(1192, "basicgenerator.naquadah.tier.06",new String[]{"Requires Enriched Naquadah Long Rods"}, "Naquadah Reactor Mark III", 6).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_NaquadahReactor(1188, "basicgenerator.naquadah.tier.07",new String[]{"Requires Naquadria Bolts"}, "Naquadah Reactor Mark IV", 7).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_NaquadahReactor(1189, "basicgenerator.naquadah.tier.08",new String[]{"Requires Naquadria Rods"}, "Naquadah Reactor Mark V", 8).getStackForm(1L)); - //ItemList.Generator_Naquadah_Mark_VI.set(new GT_MetaTileEntity_NaquadahReactor(1168, "basicgenerator.naquadah.tier.09",new String[]{"Requires fluid Naquadah Fuel"}, "Naquadah Reactor Mark VI", GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels,9).getStackForm(1L)); - //TODO CHECK RECIPES - //GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_I.get(1L), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_EV, 'F', ItemList.Field_Generator_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium), 'U', OrePrefixes.stick.get(Materials.Uranium235)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_II.get(1L), bitsd, new Object[]{"PCP", "FMF", aTextWireCoil, 'M', ItemList.Hull_IV, 'F', ItemList.Field_Generator_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten), 'P', OrePrefixes.stick.get(Materials.Plutonium241)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_III.get(1L), bitsd, new Object[]{"NCN", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), 'N', OrePrefixes.stick.get(Materials.NaquadahEnriched)}); 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)); @@ -1116,14 +917,8 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI 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.get(1L), bitsd, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', ItemList.Casing_LuV}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_Fusion2.get(1L), bitsd, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Americium), 'F', ItemList.Casing_Fusion}); 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}); -// GT_ModHandler.addCraftingRecipe(ItemList.FusionComputer_LuV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Casing_Fusion_Coil, 'B', OrePrefixes.plate.get(Materials.NetherStar), 'C', OrePrefixes.circuit.get(Materials.Master), 'F', ItemList.Field_Generator_IV, 'T', OrePrefixes.plate.get(Materials.Plutonium241)}); -// GT_ModHandler.addCraftingRecipe(ItemList.FusionComputer_ZPMV.get(1L), bitsd, new Object[]{"CBC", "FMF", "CBC", 'M', ItemList.FusionComputer_LuV, 'C', OrePrefixes.circuit.get(Materials.Master), 'F', ItemList.Field_Generator_IV, 'B', OrePrefixes.plate.get(Materials.Europium)}); -// GT_ModHandler.addCraftingRecipe(ItemList.FusionComputer_UV.get(1L), bitsd, new Object[]{"CBC", "FMF", "CBC", 'M', ItemList.FusionComputer_ZPMV, 'C', OrePrefixes.circuit.get(Materials.Master), 'F', ItemList.Field_Generator_IV, 'B', OrePrefixes.plate.get(Materials.Americium)}); - 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)); @@ -1155,21 +950,14 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Pump_HV.set(new GT_MetaTileEntity_Pump(1142, "basicmachine.pump.tier.03", "Advanced Pump II", 3).getStackForm(1L)); ItemList.Pump_EV.set(new GT_MetaTileEntity_Pump(1143, "basicmachine.pump.tier.04", "Advanced Pump III", 4).getStackForm(1L)); ItemList.Pump_IV.set(new GT_MetaTileEntity_Pump(1144, "basicmachine.pump.tier.05", "Advanced Pump IV", 5).getStackForm(1L)); -// ItemList.Pump_LuV.set(new GT_MetaTileEntity_Pump(1132, "basicmachine.pump.tier.06", "Advanced Pump V", 6).getStackForm(1L)); -// ItemList.Pump_ZPM.set(new GT_MetaTileEntity_Pump(1133, "basicmachine.pump.tier.07", "Advanced Pump VI", 7).getStackForm(1L)); -// ItemList.Pump_UV.set(new GT_MetaTileEntity_Pump(1134, "basicmachine.pump.tier.08", "Advanced Pump VII", 8).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_LuV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_LuV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Electric_Pump_LuV}); -// GT_ModHandler.addCraftingRecipe(ItemList.Pump_ZPM.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_ZPM, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Electric_Pump_ZPM}); -// GT_ModHandler.addCraftingRecipe(ItemList.Pump_UV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_UV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'P', ItemList.Electric_Pump_UV}); ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter", 9).getStackForm(1L)); - //GT_ModHandler.addCraftingRecipe(ItemList.Teleporter.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BCB", 'M', ItemList.Hull_LuV, 'B', ItemList.Tool_DataOrb, 'C', OrePrefixes.circuit.get(Materials.Elite), 'P', ItemList.Field_Generator_EV}); 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)); @@ -1248,9 +1036,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI 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.Superconductor), 'P', ItemList.Field_Generator_UV}); - //ItemList.CuringOven.set(new GT_MetaTileEntity_CuringOven(1167, "basicmachine.curingoven", "Curing Oven", 1).getStackForm(1)); - //GT_ModHandler.addCraftingRecipe(ItemList.CuringOven.get(1L), bitsd, new Object[]{"CWC", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'W', GT_OreDictUnificator.get(OrePrefixes.cable, Materials.Tin, 1), 'C', GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Cupronickel, 1)}); - 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}); @@ -1383,36 +1168,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI 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, aBoolConst_0).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, aBoolConst_0).getStackForm(1L)); - /*GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.Copper), new GT_MetaPipeEntity_Fluid(5110, "GT_Pipe_Copper_Tiny", "Tiny Copper Fluid Pipe", 0.25F, Materials.Copper, 10, 1000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Copper), new GT_MetaPipeEntity_Fluid(5111, "GT_Pipe_Copper_Small", "Small Copper Fluid Pipe", 0.375F, Materials.Copper, 20, 1000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Copper), new GT_MetaPipeEntity_Fluid(5112, "GT_Pipe_Copper", "Copper Fluid Pipe", 0.5F, Materials.Copper, 60, 1000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Copper), new GT_MetaPipeEntity_Fluid(5113, "GT_Pipe_Copper_Large", "Large Copper Fluid Pipe", 0.75F, Materials.Copper, 120, 1000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Copper), new GT_MetaPipeEntity_Fluid(5114, "GT_Pipe_Copper_Huge", "Huge Copper Fluid Pipe", 0.875F, Materials.Copper, 240, 1000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.Bronze), new GT_MetaPipeEntity_Fluid(5120, "GT_Pipe_Bronze_Tiny", "Tiny Bronze Fluid Pipe", 0.25F, Materials.Bronze, 20, 2000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Bronze), new GT_MetaPipeEntity_Fluid(5121, "GT_Pipe_Bronze_Small", "Small Bronze Fluid Pipe", 0.375F, Materials.Bronze, 40, 2000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Bronze), new GT_MetaPipeEntity_Fluid(5122, "GT_Pipe_Bronze", "Bronze Fluid Pipe", 0.5F, Materials.Bronze, 120, 2000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Bronze), new GT_MetaPipeEntity_Fluid(5123, "GT_Pipe_Bronze_Large", "Large Bronze Fluid Pipe", 0.75F, Materials.Bronze, 240, 2000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Bronze), new GT_MetaPipeEntity_Fluid(5124, "GT_Pipe_Bronze_Huge", "Huge Bronze Fluid Pipe", 0.875F, Materials.Bronze, 480, 2000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.Steel), new GT_MetaPipeEntity_Fluid(5130, "GT_Pipe_Steel_Tiny", "Tiny Steel Fluid Pipe", 0.25F, Materials.Steel, 40, 2500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Steel), new GT_MetaPipeEntity_Fluid(5131, "GT_Pipe_Steel_Small", "Small Steel Fluid Pipe", 0.375F, Materials.Steel, 80, 2500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Steel), new GT_MetaPipeEntity_Fluid(5132, "GT_Pipe_Steel", "Steel Fluid Pipe", 0.5F, Materials.Steel, 240, 2500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Steel), new GT_MetaPipeEntity_Fluid(5133, "GT_Pipe_Steel_Large", "Large Steel Fluid Pipe", 0.75F, Materials.Steel, 480, 2500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Steel), new GT_MetaPipeEntity_Fluid(5134, "GT_Pipe_Steel_Huge", "Huge Steel Fluid Pipe", 0.875F, Materials.Steel, 960, 2500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.StainlessSteel), new GT_MetaPipeEntity_Fluid(5140, "GT_Pipe_StainlessSteel_Tiny", "Tiny Stainless Steel Fluid Pipe", 0.25F, Materials.StainlessSteel, 60, 3000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.StainlessSteel), new GT_MetaPipeEntity_Fluid(5141, "GT_Pipe_StainlessSteel_Small", "Small Stainless Steel Fluid Pipe", 0.375F, Materials.StainlessSteel, 120, 3000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.StainlessSteel), new GT_MetaPipeEntity_Fluid(5142, "GT_Pipe_StainlessSteel", "Stainless Steel Fluid Pipe", 0.5F, Materials.StainlessSteel, 360, 3000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.StainlessSteel), new GT_MetaPipeEntity_Fluid(5143, "GT_Pipe_StainlessSteel_Large", "Large Stainless Steel Fluid Pipe", 0.75F, Materials.StainlessSteel, 720, 3000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.StainlessSteel), new GT_MetaPipeEntity_Fluid(5144, "GT_Pipe_StainlessSteel_Huge", "Huge Stainless Steel Fluid Pipe", 0.875F, Materials.StainlessSteel, 1440, 3000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.Titanium), new GT_MetaPipeEntity_Fluid(5150, "GT_Pipe_Titanium_Tiny", "Tiny Titanium Fluid Pipe", 0.25F, Materials.Titanium, 80, 5000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Titanium), new GT_MetaPipeEntity_Fluid(5151, "GT_Pipe_Titanium_Small", "Small Titanium Fluid Pipe", 0.375F, Materials.Titanium, 160, 5000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Titanium), new GT_MetaPipeEntity_Fluid(5152, "GT_Pipe_Titanium", "Titanium Fluid Pipe", 0.5F, Materials.Titanium, 480, 5000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Titanium), new GT_MetaPipeEntity_Fluid(5153, "GT_Pipe_Titanium_Large", "Large Titanium Fluid Pipe", 0.75F, Materials.Titanium, 960, 5000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Titanium), new GT_MetaPipeEntity_Fluid(5154, "GT_Pipe_Titanium_Huge", "Huge Titanium Fluid Pipe", 0.875F, Materials.Titanium, 1920, 5000, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.TungstenSteel), new GT_MetaPipeEntity_Fluid(5160, "GT_Pipe_TungstenSteel_Tiny", "Tiny Tungstensteel Fluid Pipe", 0.25F, Materials.TungstenSteel, 100, 7500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.TungstenSteel), new GT_MetaPipeEntity_Fluid(5161, "GT_Pipe_TungstenSteel_Small", "Small Tungstensteel Fluid Pipe", 0.375F, Materials.TungstenSteel, 200, 7500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.TungstenSteel), new GT_MetaPipeEntity_Fluid(5162, "GT_Pipe_TungstenSteel", "Tungstensteel Fluid Pipe", 0.5F, Materials.TungstenSteel, 600, 7500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.TungstenSteel), new GT_MetaPipeEntity_Fluid(5163, "GT_Pipe_TungstenSteel_Large", "Large Tungstensteel Fluid Pipe", 0.75F, Materials.TungstenSteel, 1200, 7500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.TungstenSteel), new GT_MetaPipeEntity_Fluid(5164, "GT_Pipe_TungstenSteel_Huge", "Huge Tungstensteel Fluid Pipe", 0.875F, Materials.TungstenSteel, 2400, 7500, true).getStackForm(1L));*/ generateFluidPipes(Materials.Copper, Materials.Copper.mName, 5110, 20, 1000, true); generateFluidMultiPipes(Materials.Copper, Materials.Copper.mName, 5115, 20, 1000, true); generateFluidPipes(Materials.Bronze, Materials.Bronze.mName, 5120, 120, 2000, true); @@ -1430,12 +1185,6 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5165, "GT_Pipe_HighPressure_Small", "Small High Pressure Fluid Pipe", 0.375F, Materials.Redstone, 4800, 1500, true).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5166, "GT_Pipe_HighPressure", "High Pressure Fluid Pipe", 0.5F, Materials.Redstone, 7200, 1500, true).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5167, "GT_Pipe_HighPressure_Large", "Large High Pressure Fluid Pipe", 0.75F, Materials.Redstone, 9600, 1500, true).getStackForm(1L)); - //GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Superconductor), new GT_MetaPipeEntity_Fluid(5168, "GT_Pipe_PlasmaContain", "Plasma Containment Pipe", 0.5F, Materials.Glowstone, 240, 100000, true).getStackForm(1L)); - /*GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5170, "GT_Pipe_Plastic_Tiny", "Tiny Plastic Fluid Pipe", 0.25F, Materials.Plastic, 60, 350, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5171, "GT_Pipe_Plastic_Small", "Small Plastic Fluid Pipe", 0.375F, Materials.Plastic, 120, 350, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5172, "GT_Pipe_Plastic", "Plastic Fluid Pipe", 0.5F, Materials.Plastic, 360, 350, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5173, "GT_Pipe_Plastic_Large", "Large Plastic Fluid Pipe", 0.75F, Materials.Plastic, 720, 350, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5174, "GT_Pipe_Plastic_Huge", "Huge Plastic Fluid Pipe", 0.875F, Materials.Plastic, 1440, 350, true).getStackForm(1L));*/ generateFluidPipes(Materials.Plastic, Materials.Plastic.mName, "Plastic", 5170, 360, 350, true); generateFluidMultiPipes(Materials.Plastic, Materials.Plastic.mName, "Plastic", 5175, 360, 350, true); generateFluidPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5680, 480, 600, true); @@ -1445,32 +1194,7 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1L), 400, 4096); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(2L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L), 600, 7680); - //GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Superconductor, 1L), bitsd, new Object[]{"WSW", aTextCableHull, "WSW", 'M', OrePrefixes.pipeSmall.get(Materials.Titanium), 'C', OrePrefixes.plate.get(Materials.NeodymiumMagnetic), 'W', OrePrefixes.plate.get(Materials.Plastic), 'S', OrePrefixes.wireGt02.get(Materials.Superconductor)}); - - /*GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Brass), new GT_MetaPipeEntity_Item(5602, "GT_Pipe_Brass", "Brass Item Pipe", 0.5F, Materials.Brass, 1, 32768, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Brass), new GT_MetaPipeEntity_Item(5603, "GT_Pipe_Brass_Large", "Large Brass Item Pipe", 0.75F, Materials.Brass, 2, 16384, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Brass), new GT_MetaPipeEntity_Item(5604, "GT_Pipe_Brass_Huge", "Huge Brass Item Pipe", 0.875F, Materials.Brass, 4, 8192, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(Materials.Brass), new GT_MetaPipeEntity_Item(5607, "GT_Pipe_Restrictive_Brass", "Restrictive Brass Item Pipe", 0.5F, Materials.Brass, 1, 3276800, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(Materials.Brass), new GT_MetaPipeEntity_Item(5608, "GT_Pipe_Restrictive_Brass_Large", "Large Restrictive Brass Item Pipe", 0.75F, Materials.Brass, 2, 1638400, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(Materials.Brass), new GT_MetaPipeEntity_Item(5609, "GT_Pipe_Restrictive_Brass_Huge", "Huge Restrictive Brass Item Pipe", 0.875F, Materials.Brass, 4, 819200, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5612, "GT_Pipe_Electrum", "Electrum Item Pipe", 0.5F, Materials.Electrum, 2, 16384, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5613, "GT_Pipe_Electrum_Large", "Large Electrum Item Pipe", 0.75F, Materials.Electrum, 4, 8192, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5614, "GT_Pipe_Electrum_Huge", "Huge Electrum Item Pipe", 0.875F, Materials.Electrum, 8, 4096, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5617, "GT_Pipe_Restrictive_Electrum", "Restrictive Electrum Item Pipe", 0.5F, Materials.Electrum, 2, 1638400, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5618, "GT_Pipe_Restrictive_Electrum_Large", "Large Restrictive Electrum Item Pipe", 0.75F, Materials.Electrum, 4, 819200, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(Materials.Electrum), new GT_MetaPipeEntity_Item(5619, "GT_Pipe_Restrictive_Electrum_Huge", "Huge Restrictive Electrum Item Pipe", 0.875F, Materials.Electrum, 8, 409600, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5622, "GT_Pipe_Platinum", "Platinum Item Pipe", 0.5F, Materials.Platinum, 4, 8192, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5623, "GT_Pipe_Platinum_Large", "Large Platinum Item Pipe", 0.75F, Materials.Platinum, 8, 4096, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5624, "GT_Pipe_Platinum_Huge", "Huge Platinum Item Pipe", 0.875F, Materials.Platinum, 16, 2048, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5627, "GT_Pipe_Restrictive_Platinum", "Restrictive Platinum Item Pipe", 0.5F, Materials.Platinum, 4, 819200, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5628, "GT_Pipe_Restrictive_Platinum_Large", "Large Restrictive Platinum Item Pipe", 0.75F, Materials.Platinum, 8, 409600, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(Materials.Platinum), new GT_MetaPipeEntity_Item(5629, "GT_Pipe_Restrictive_Platinum_Huge", "Huge Restrictive Platinum Item Pipe", 0.875F, Materials.Platinum, 16, 204800, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5632, "GT_Pipe_Osmium", "Osmium Item Pipe", 0.5F, Materials.Osmium, 8, 4096, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5633, "GT_Pipe_Osmium_Large", "Large Osmium Item Pipe", 0.75F, Materials.Osmium, 16, 2048, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5634, "GT_Pipe_Osmium_Huge", "Huge Osmium Item Pipe", 0.875F, Materials.Osmium, 32, 1024, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5637, "GT_Pipe_Restrictive_Osmium", "Restrictive Osmium Item Pipe", 0.5F, Materials.Osmium, 8, 409600, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5638, "GT_Pipe_Restrictive_Osmium_Large", "Large Restrictive Osmium Item Pipe", 0.75F, Materials.Osmium, 16, 204800, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(Materials.Osmium), new GT_MetaPipeEntity_Item(5639, "GT_Pipe_Restrictive_Osmium_Huge", "Huge Restrictive Osmium Item Pipe", 0.875F, Materials.Osmium, 32, 102400, true).getStackForm(1L));*/ + generateItemPipes(Materials.Brass, Materials.Brass.mName, 5602, 1); generateItemPipes(Materials.Electrum, Materials.Electrum.mName, 5612, 2); generateItemPipes(Materials.Platinum, Materials.Platinum.mName, 5622, 4); @@ -1645,6 +1369,7 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI } + @Override public void run() { GT_Log.out.println("GT_Mod: Registering MetaTileEntities."); run1(); 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 48f37f51fb..efb54fa25d 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java @@ -12,14 +12,14 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_Loader_OreDictionary - implements Runnable { +public class GT_Loader_OreDictionary implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register OreDict Entries of Non-GT-Items."); - GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Empty, ItemList.Cell_Empty.get(1L, new Object[0])); - GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Lava, ItemList.Cell_Lava.get(1L, new Object[0])); + GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Empty, ItemList.Cell_Empty.get(1L)); + GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Lava, ItemList.Cell_Lava.get(1L)); GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Lava, GT_ModHandler.getIC2Item("lavaCell", 1L)); - GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Water, ItemList.Cell_Water.get(1L, new Object[0])); + 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)); @@ -68,7 +68,7 @@ public class GT_Loader_OreDictionary GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Iron, new ItemStack(Items.iron_ingot, 1)); GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Paper, new ItemStack(Items.paper, 1)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Sugar, new ItemStack(Items.sugar, 1)); - GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Bone, ItemList.Dye_Bonemeal.get(1L, new Object[0])); + GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Bone, ItemList.Dye_Bonemeal.get(1L)); GT_OreDictUnificator.set(OrePrefixes.stick, Materials.Wood, new ItemStack(Items.stick, 1)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Redstone, new ItemStack(Items.redstone, 1)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Gunpowder, new ItemStack(Items.gunpowder, 1)); @@ -82,12 +82,14 @@ public class GT_Loader_OreDictionary GT_OreDictUnificator.set(OrePrefixes.block, Materials.Lapis, new ItemStack(Blocks.lapis_block, 1, 0)); GT_OreDictUnificator.set(OrePrefixes.block, Materials.Coal, new ItemStack(Blocks.coal_block, 1, 0)); GT_OreDictUnificator.set(OrePrefixes.block, Materials.Redstone, new ItemStack(Blocks.redstone_block, 1, 0)); + GT_OreDictUnificator.set(OrePrefixes.block, Materials.NetherQuartz, new ItemStack(Blocks.quartz_block, 1, 0)); + GT_OreDictUnificator.set(OrePrefixes.block, Materials.Clay, new ItemStack(Blocks.clay, 1, 0)); if (Blocks.ender_chest != null) { 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", "tile.railcraft.anvil", 1L, 0)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingIndustrialDiamond, ItemList.IC2_Industrial_Diamond.get(1L, new Object[0])); + GT_OreDictUnificator.registerOre(OreDictNames.craftingIndustrialDiamond, ItemList.IC2_Industrial_Diamond.get(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.dust, Materials.Wood, GT_ModHandler.getModItem("ThermalExpansion", "sawdust", 1L)); GT_OreDictUnificator.registerOre(OrePrefixes.glass, Materials.Reinforced, GT_ModHandler.getIC2Item("reinforcedGlass", 1L)); GT_OreDictUnificator.registerOre(OrePrefixes.glass, Materials.Reinforced, GT_ModHandler.getModItem("ThermalExpansion", "glassHardened", 1L)); @@ -97,6 +99,7 @@ public class GT_Loader_OreDictionary GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, GT_ModHandler.getModItem("Railcraft", "tile.railcraft.brick.abyssal", 1L, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, GT_ModHandler.getModItem("Railcraft", "tile.railcraft.brick.quarried", 1L, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(Blocks.obsidian, 1, 32767)); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Stone, new ItemStack(Blocks.stone, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneMossy, new ItemStack(Blocks.mossy_cobblestone, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneCobble, new ItemStack(Blocks.mossy_cobblestone, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneCobble, new ItemStack(Blocks.cobblestone, 1, 32767)); @@ -109,6 +112,7 @@ public class GT_Loader_OreDictionary 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)); @@ -117,9 +121,9 @@ public class GT_Loader_OreDictionary GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); - GT_OreDictUnificator.registerOre("cropLemon", ItemList.FR_Lemon.get(1L, new Object[0])); - GT_OreDictUnificator.registerOre("cropCoffee", ItemList.IC2_CoffeeBeans.get(1L, new Object[0])); - GT_OreDictUnificator.registerOre("cropPotato", ItemList.Food_Raw_Potato.get(1L, new Object[0])); + GT_OreDictUnificator.registerOre("cropLemon", ItemList.FR_Lemon.get(1L)); + GT_OreDictUnificator.registerOre("cropCoffee", ItemList.IC2_CoffeeBeans.get(1L)); + GT_OreDictUnificator.registerOre("cropPotato", ItemList.Food_Raw_Potato.get(1L)); GT_OreDictUnificator.registerOre("calclavia:BATTERY", GT_ModHandler.getIC2Item("reBattery", 1L)); GT_OreDictUnificator.registerOre("calclavia:BATTERY", GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("reBattery", 1L)); 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 b55ed8642e..8fa37dfe7b 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java @@ -5,52 +5,34 @@ import gregtech.loaders.oreprocessing.*; public class GT_Loader_OreProcessing implements Runnable { + @Override public void run() { GT_Log.out.println("GT_Mod: Register Ore processing."); new ProcessingAll(); new ProcessingArrows(); - //new ProcessingBattery(); new ProcessingBeans(); new ProcessingBlock(); new ProcessingBolt(); new ProcessingCell(); - //new ProcessingCellPlasma(); new ProcessingCrate(); new ProcessingCircuit(); new ProcessingCompressed(); new ProcessingCrafting(); new ProcessingCrop(); new ProcessingCrushedOre(); - //new ProcessingCrushedPurified(); - //new ProcessingCrushedCentrifuged(); new ProcessingCrystallized(); new ProcessingDirty(); new ProcessingDust(); - //new ProcessingDustImpure(); - //new ProcessingDustSmall(); - //new ProcessingDustTiny(); new ProcessingDye(); new ProcessingFoil(); new ProcessingFineWire(); new ProcessingFood(); new ProcessingLens(); new ProcessingShaping(); - //new ProcessingGemChipped(); - //new ProcessingGemFlawed(); new ProcessingGem(); - //new ProcessingGemFlawless(); - //new ProcessingGemExquisite(); new ProcessingGear(); - //new ProcessingGearSmall(); new ProcessingIngot(); - //new ProcessingIngot1(); - //new ProcessingIngot2(); - //new ProcessingIngot3(); - //new ProcessingIngot4(); - //new ProcessingIngot5(); - //new ProcessingIngotHot(); new ProcessingItem(); - //new ProcessingLeaves(); new ProcessingLog(); new ProcessingTransforming(); new ProcessingNugget(); @@ -58,21 +40,8 @@ public class GT_Loader_OreProcessing new ProcessingOrePoor(); new ProcessingOreSmelting(); new ProcessingPipe(); - //new ProcessingPipeSmall(); - //new ProcessingPipeMedium(); - //new ProcessingPipeLarge(); - //new ProcessingPipeHuge(); - //new ProcessingPipeTiny(); - //new ProcessingPipeRestrictive(); new ProcessingPlank(); new ProcessingPlate(); - //new ProcessingPlate1(); - //new ProcessingPlate2(); - //new ProcessingPlate3(); - //new ProcessingPlate4(); - //new ProcessingPlate5(); - //new ProcessingPlate9(); - //new ProcessingPlateAlloy(); new ProcessingPure(); new ProcessingRecycling(); new ProcessingRound(); @@ -88,29 +57,7 @@ public class GT_Loader_OreProcessing new ProcessingStoneVarious(); new ProcessingToolHead(); new ProcessingToolOther(); - //new ProcessingToolHeadArrow(); - //new ProcessingToolHeadAxe(); - //new ProcessingToolHeadBuzzSaw(); - //new ProcessingToolHeadFile(); - //new ProcessingToolHeadHammer(); - //new ProcessingToolHeadHoe(); - //new ProcessingToolHeadPickaxe(); - //new ProcessingToolHeadSaw(); - //new ProcessingToolHeadSense(); - //new ProcessingToolHeadShovel(); - //new ProcessingToolHeadSword(); - //new ProcessingToolHeadPlow(); - //new ProcessingToolHeadDrill(); - //new ProcessingToolHeadChainsaw(); - //new ProcessingToolHeadWrench(); - //new ProcessingToolHeadUniversalSpade(); new ProcessingWax(); new ProcessingWire(); - //new ProcessingWire01(); - //new ProcessingWire02(); - //new ProcessingWire04(); - //new ProcessingWire08(); - //new ProcessingWire12(); - //new ProcessingWire16(); } } diff --git a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java index dc6633a4a9..6c315edb42 100644 --- a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java @@ -30,13 +30,13 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; import static gregtech.api.util.GT_Utility.trans; -public class GT_NEI_AssLineHandler - extends TemplateRecipeHandler { +public class GT_NEI_AssLineHandler extends TemplateRecipeHandler { public static final int sOffsetX = 5; public static final int sOffsetY = 11; @@ -49,7 +49,7 @@ public class GT_NEI_AssLineHandler public GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {//this is called when recipes should be shown this.mRecipeMap = aRecipeMap; - this.transferRects.add(new RecipeTransferRect(new Rectangle(138, 18, 18, 18), getOverlayIdentifier(), new Object[0])); + this.transferRects.add(new RecipeTransferRect(new Rectangle(138, 18, 18, 18), getOverlayIdentifier())); if (!NEI_GT_Config.sIsAdded) { FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + getRecipeName() + "@" + getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(this); @@ -57,18 +57,26 @@ public class GT_NEI_AssLineHandler } } + public List<GT_Recipe> getSortedRecipes() { + List<GT_Recipe> result = new ArrayList<>(this.mRecipeMap.mRecipeList); + Collections.sort(result); + return result; + } + public static void drawText(int aX, int aY, String aString, int aColor) { Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); } + @Override public TemplateRecipeHandler newInstance() { NEI_GT_Config.ALH=new GT_NEI_AssLineHandler(this.mRecipeMap); return NEI_GT_Config.ALH; } + @Override public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equals(getOverlayIdentifier())) { - for (GT_Recipe tRecipe : this.mRecipeMap.mRecipeList) { + for (GT_Recipe tRecipe : getSortedRecipes()) { if (!tRecipe.mHidden) { this.arecipes.add(new CachedDefaultRecipe(tRecipe)); }else{ @@ -80,6 +88,7 @@ public class GT_NEI_AssLineHandler } } + @Override public void loadCraftingRecipes(ItemStack aResult) { ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); @@ -96,11 +105,11 @@ public class GT_NEI_AssLineHandler tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { - tResults.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + tResults.add(GT_Utility.copy(tData.filledContainer)); } } } - for (GT_Recipe tRecipe : this.mRecipeMap.mRecipeList) { + for (GT_Recipe tRecipe : getSortedRecipes()) { if (!tRecipe.mHidden) { CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); for (ItemStack tStack : tResults) { @@ -109,7 +118,7 @@ public class GT_NEI_AssLineHandler break; } } - }else{ + } else { CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); for (ItemStack tStack : tResults) { if (tNEIRecipe.contains(tNEIRecipe.mOutputs, tStack)) { @@ -121,6 +130,7 @@ public class GT_NEI_AssLineHandler } } + @Override public void loadUsageRecipes(ItemStack aInput) { ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); @@ -137,7 +147,7 @@ public class GT_NEI_AssLineHandler tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { - tInputs.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + tInputs.add(GT_Utility.copy(tData.filledContainer)); } } } @@ -163,28 +173,34 @@ public class GT_NEI_AssLineHandler CachedDefaultRecipe tNEIRecipe; } + @Override public String getOverlayIdentifier() { return this.mRecipeMap.mNEIName; } + @Override public void drawBackground(int recipe) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 79); } + @Override public int recipiesPerPage() { return 1; } + @Override public String getRecipeName() { return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); } + @Override public String getGuiTexture() { return this.mRecipeMap.mNEIGUIPath; } + @Override public List<String> handleItemTooltip(GuiRecipe gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) { CachedRecipe tObject = (CachedRecipe) this.arecipes.get(aRecipeIndex); if ((tObject instanceof CachedDefaultRecipe)) { @@ -212,6 +228,7 @@ public class GT_NEI_AssLineHandler return currenttip; } + @Override public void drawExtras(int aRecipeIndex) { int tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; @@ -250,20 +267,14 @@ public class GT_NEI_AssLineHandler } } - public static class GT_RectHandler - implements IContainerInputHandler, IContainerTooltipHandler { + public static class GT_RectHandler implements IContainerInputHandler, IContainerTooltipHandler { + @Override public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { - //if (canHandle(gui)) { - // if (button == 0) { - // return transferRect(gui, false); - // } - // if (button == 1) { - // return transferRect(gui, true); - // } - //} + return false; } + @Override public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; } @@ -273,12 +284,8 @@ public class GT_NEI_AssLineHandler //return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI))); } + @Override public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) { - //if ((canHandle(gui)) && (currenttip.isEmpty())) { - // if (new Rectangle(138, 18, 18, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { - // currenttip.add("Recipes"); - // } - //} return currenttip; } @@ -287,34 +294,43 @@ public class GT_NEI_AssLineHandler } + @Override public List<String> handleItemDisplayName(GuiContainer gui, ItemStack itemstack, List<String> currenttip) { return currenttip; } + @Override public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey, List<String> currenttip) { return currenttip; } + @Override public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; } + @Override public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) { } + @Override public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) { } + @Override public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) { } + @Override public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { return false; } + @Override public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { } + @Override public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) { } } @@ -333,6 +349,7 @@ public class GT_NEI_AssLineHandler this.mChance = aChance; } + @Override public void generatePermutations() { if (this.permutated) { return; @@ -403,14 +420,17 @@ public class GT_NEI_AssLineHandler } } + @Override public List<PositionedStack> getIngredients() { return getCycledIngredients(GT_NEI_AssLineHandler.this.cycleticks / 10, this.mInputs); } + @Override public PositionedStack getResult() { return null; } + @Override public List<PositionedStack> getOtherStacks() { return this.mOutputs; } diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 956e769a21..f37eea25e9 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -36,8 +36,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -public class GT_NEI_DefaultHandler - extends TemplateRecipeHandler { +public class GT_NEI_DefaultHandler extends TemplateRecipeHandler { public static final int sOffsetX = 5; public static final int sOffsetY = 11; @@ -50,7 +49,7 @@ public class GT_NEI_DefaultHandler public GT_NEI_DefaultHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) { this.mRecipeMap = aRecipeMap; - this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier(), new Object[0])); + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier())); if (!NEI_GT_Config.sIsAdded) { FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + getRecipeName() + "@" + getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(this); @@ -68,10 +67,12 @@ public class GT_NEI_DefaultHandler Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); } + @Override public TemplateRecipeHandler newInstance() { return new GT_NEI_DefaultHandler(this.mRecipeMap); } + @Override public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equals(getOverlayIdentifier())) { for (GT_Recipe tRecipe : getSortedRecipes()) { @@ -84,6 +85,7 @@ public class GT_NEI_DefaultHandler } } + @Override public void loadCraftingRecipes(ItemStack aResult) { ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); @@ -100,7 +102,7 @@ public class GT_NEI_DefaultHandler tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { - tResults.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + tResults.add(GT_Utility.copy(tData.filledContainer)); } } } @@ -117,6 +119,7 @@ public class GT_NEI_DefaultHandler } } + @Override public void loadUsageRecipes(ItemStack aInput) { ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); @@ -133,7 +136,7 @@ public class GT_NEI_DefaultHandler tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { - tInputs.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + tInputs.add(GT_Utility.copy(tData.filledContainer)); } } } @@ -151,29 +154,35 @@ public class GT_NEI_DefaultHandler CachedDefaultRecipe tNEIRecipe; } + @Override public String getOverlayIdentifier() { return this.mRecipeMap.mNEIName; } + @Override public void drawBackground(int recipe) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78); } + @Override public int recipiesPerPage() { return 1; } + @Override public String getRecipeName() { return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); } + @Override public String getGuiTexture() { // return "gregtech:textures/gui/" + this.mRecipeMap.mUnlocalizedName + ".png"; return this.mRecipeMap.mNEIGUIPath; } + @Override public List<String> handleItemTooltip(GuiRecipe gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) { TemplateRecipeHandler.CachedRecipe tObject = (TemplateRecipeHandler.CachedRecipe) this.arecipes.get(aRecipeIndex); if ((tObject instanceof CachedDefaultRecipe)) { @@ -201,7 +210,8 @@ public class GT_NEI_DefaultHandler return currenttip; } - public void drawExtras(int aRecipeIndex) { + @Override + public void drawExtras(int aRecipeIndex) { int tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; String[] recipeDesc = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.getNeiDesc(); @@ -250,6 +260,7 @@ public class GT_NEI_DefaultHandler public static class GT_RectHandler implements IContainerInputHandler, IContainerTooltipHandler { + @Override public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { if (canHandle(gui)) { if (button == 0) { @@ -262,6 +273,7 @@ public class GT_NEI_DefaultHandler return false; } + @Override public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; } @@ -272,6 +284,7 @@ public class GT_NEI_DefaultHandler || (gui instanceof GT_GUIContainer_PrimitiveBlastFurnace && GT_Utility.isStringValid(((GT_GUIContainer_PrimitiveBlastFurnace) gui).mNEI)); } + @Override public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) { if ((canHandle(gui)) && (currenttip.isEmpty())) { if (gui instanceof GT_GUIContainer_BasicMachine && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { @@ -288,43 +301,52 @@ public class GT_NEI_DefaultHandler private boolean transferRect(GuiContainer gui, boolean usage) { if (gui instanceof GT_GUIContainer_BasicMachine) { - return (canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); + return (canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI)); } else if (gui instanceof GT_GUIContainer_FusionReactor) { - return (canHandle(gui)) && (new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0])); + return (canHandle(gui)) && (new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI)); } else if (gui instanceof GT_GUIContainer_PrimitiveBlastFurnace) { - return (canHandle(gui)) && (new Rectangle(51, 10, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_PrimitiveBlastFurnace) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_PrimitiveBlastFurnace) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_PrimitiveBlastFurnace) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_PrimitiveBlastFurnace) gui).mNEI, new Object[0])); + return (canHandle(gui)) && (new Rectangle(51, 10, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_PrimitiveBlastFurnace) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_PrimitiveBlastFurnace) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_PrimitiveBlastFurnace) gui).mNEI) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_PrimitiveBlastFurnace) gui).mNEI)); } return false; } + @Override public List<String> handleItemDisplayName(GuiContainer gui, ItemStack itemstack, List<String> currenttip) { return currenttip; } + @Override public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey, List<String> currenttip) { return currenttip; } + @Override public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; } + @Override public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) { } + @Override public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) { } + @Override public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) { } + @Override public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { return false; } + @Override public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { } + @Override public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) { } } @@ -342,6 +364,7 @@ public class GT_NEI_DefaultHandler this.mChance = aChance; } + @Override public void generatePermutations() { if (this.permutated) { return; @@ -353,7 +376,7 @@ public class GT_NEI_DefaultHandler List<ItemStack> permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); if (!permutations.isEmpty()) { ItemStack stack; - for (Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + for (Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, stack))) { stack = (ItemStack) i$.next(); } } else { @@ -362,7 +385,7 @@ public class GT_NEI_DefaultHandler tDisplayStacks.add(base); } } else { - tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); + tDisplayStacks.add(GT_Utility.copy(tStack)); } } } @@ -845,14 +868,17 @@ public class GT_NEI_DefaultHandler } } + @Override public List<PositionedStack> getIngredients() { return getCycledIngredients(GT_NEI_DefaultHandler.this.cycleticks / 10, this.mInputs); } + @Override public PositionedStack getResult() { return null; } + @Override public List<PositionedStack> getOtherStacks() { return this.mOutputs; } diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index d1db906fd0..5aef5b2901 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -5,11 +5,11 @@ import cpw.mods.fml.common.FMLCommonHandler; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Recipe; -public class NEI_GT_Config - implements IConfigureNEI { +public class NEI_GT_Config implements IConfigureNEI { public static boolean sIsAdded = true; public static GT_NEI_AssLineHandler ALH; + @Override public void loadConfig() { sIsAdded = false; for (GT_Recipe.GT_Recipe_Map tMap : GT_Recipe.GT_Recipe_Map.sMappings) { @@ -24,10 +24,12 @@ public class NEI_GT_Config sIsAdded = true; } + @Override public String getName() { return "GregTech NEI Plugin"; } + @Override public String getVersion() { return "(5.03a)"; } |