From b2e564412f753ae935b5a34abcb3b5cd30acccfa Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Thu, 12 May 2016 14:24:04 -0700 Subject: Added missing assembler recipes for casings Added missing assembler recipes for casings: Basic Machine Casing, UV Machine Casing, Heat Proof Machine Casing, Cupronickel Coil Block, Kanthal Coil Block, Nichrome Coil Block, Superconducting Coil Block, Solid Steel Machine Casing, Frost Proof Machine Casing, Robust Tungstensteel Casing, Clean Stainless Steel Casing, Stable Titanium Casing, Fusion Casing, Turbine Casing, Stainless Steel Turbine Casing, Titanium Turbine Casing, Tungstensteel Turbine Casing --- .../loaders/postload/GT_MachineRecipeLoader.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index a6ebb64361..0e78e71b1e 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1078,6 +1078,7 @@ public class GT_MachineRecipeLoader GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.sandstone, 1, 2), 50, 4); GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 1), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.sandstone, 1, 0), 50, 4); GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 2), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.sandstone, 1, 0), 50, 4); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), GT_ModHandler.getIC2Item("machine", 1L), 25, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_ULV.get(1L, new Object[0]), 25, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_LV.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_MV.get(1L, new Object[0]), 50, 16); @@ -1086,7 +1087,23 @@ public class GT_MachineRecipeLoader GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_IV.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_LuV.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_ZPM.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_UV.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_MAX.get(1L, new Object[0]), 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, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Cupronickel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_Coil_Cupronickel.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Kanthal, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_Coil_Kanthal.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Nichrome, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_Coil_Nichrome.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_Coil_Superconductor.get(1L, new Object[0]), 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, new Object[0]), 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, new Object[0]), 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, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1L), ItemList.Casing_CleanStainlessSteel.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), ItemList.Casing_StableTitanium.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), ItemList.Casing_LuV.get(1L, new Object[0]), ItemList.Casing_Fusion.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlueSteel, 1L), ItemList.Casing_Turbine.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), ItemList.Casing_Turbine.get(1L, new Object[0]), ItemList.Casing_Turbine1.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), ItemList.Casing_Turbine.get(1L, new Object[0]), ItemList.Casing_Turbine2.get(1L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), ItemList.Casing_Turbine.get(1L, new Object[0]), ItemList.Casing_Turbine3.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), ItemList.Casing_ULV.get(1L, new Object[0]), Materials.Plastic.getMolten(288), ItemList.Hull_ULV.get(1L, new Object[0]), 25, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), ItemList.Casing_LV.get(1L, new Object[0]), Materials.Plastic.getMolten(288), ItemList.Hull_LV.get(1L, new Object[0]), 50, 16); -- cgit From 5169c509d68b778521906fe4c86a44e078e1794f Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Wed, 18 May 2016 07:41:36 +0300 Subject: Added configuration file to enabling processing of ores --- src/main/java/gregtech/GT_Mod.java | 27 +++++----- src/main/java/gregtech/common/GT_Proxy.java | 53 +++++++++----------- .../loaders/misc/OreProcessingConfiguration.java | 58 ++++++++++++++++++++++ 3 files changed, 97 insertions(+), 41 deletions(-) create mode 100644 src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java (limited to 'src/main/java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index c9284f8069..f4dcd27871 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -1,15 +1,17 @@ package gregtech; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.*; +import java.util.Map.Entry; + import cpw.mods.fml.common.*; import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.registry.EntityRegistry; -import forestry.api.core.ForestryAPI; import forestry.api.recipes.ICentrifugeRecipe; import forestry.api.recipes.ISqueezerRecipe; import forestry.api.recipes.RecipeManagers; -//import forestry.factory.recipes.ISqueezerRecipe; -//import forestry.factory.tiles.TileCentrifuge; -//import forestry.factory.tiles.TileSqueezer; import gregtech.api.GregTech_API; import gregtech.api.enchants.Enchantment_EnderDamage; import gregtech.api.enchants.Enchantment_Radioactivity; @@ -32,6 +34,7 @@ import gregtech.loaders.load.GT_SonictronLoader; import gregtech.loaders.misc.GT_Achievements; import gregtech.loaders.misc.GT_Bees; import gregtech.loaders.misc.GT_CoverLoader; +import gregtech.loaders.misc.OreProcessingConfiguration; import gregtech.loaders.postload.*; import gregtech.loaders.preload.*; import ic2.api.recipe.IRecipeInput; @@ -53,11 +56,9 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintStream; -import java.util.*; -import java.util.Map.Entry; +//import forestry.factory.recipes.ISqueezerRecipe; +//import forestry.factory.tiles.TileCentrifuge; +//import forestry.factory.tiles.TileSqueezer; @Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl;") @@ -250,7 +251,7 @@ public class GT_Mod gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality); } }} - + if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) { Blocks.mob_spawner.setHardness(500.0F).setResistance(6000000.0F); } @@ -297,6 +298,8 @@ public class GT_Mod new Enchantment_EnderDamage(); new Enchantment_Radioactivity(); + new OreProcessingConfiguration(aEvent.getModConfigurationDirectory()).run(); + new GT_Loader_OreProcessing().run(); new GT_Loader_OreDictionary().run(); new GT_Loader_ItemData().run(); @@ -671,7 +674,7 @@ public class GT_Mod } } } - + if(GregTech_API.mOutputRF||GregTech_API.mInputRF){ GT_Utility.checkAvailabilities(); if(!GT_Utility.RF_CHECK){ @@ -679,7 +682,7 @@ public class GT_Mod GregTech_API.mInputRF = false; } } - + achievements = new GT_Achievements(); Map.Entry tRecipe; GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables."); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index c0a55e3655..00015b910e 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1,5 +1,9 @@ package gregtech.common; +import java.io.File; +import java.text.DateFormat; +import java.util.*; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.Loader; @@ -28,12 +32,7 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.armor.ContainerBasicArmor; -import gregtech.common.items.armor.ContainerElectricArmor1; -import gregtech.common.items.armor.GuiElectricArmor1; -import gregtech.common.items.armor.GuiModularArmor; -import gregtech.common.items.armor.InventoryArmor; -import gregtech.common.items.armor.ModularArmor_Item; +import gregtech.common.items.armor.*; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -76,21 +75,17 @@ import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; -import java.io.File; -import java.text.DateFormat; -import java.util.*; - public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { private static final EnumSet PREVENTED_ORES = EnumSet.of(OreGenEvent.GenerateMinable.EventType.COAL, new OreGenEvent.GenerateMinable.EventType[]{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 mRegisteredOres = new HashSet(10000); - public final ArrayList mSoundNames = new ArrayList(); - public final ArrayList mSoundItems = new ArrayList(); - public final ArrayList mSoundCounts = new ArrayList(); - private final Collection mEvents = new HashSet(); - private final Collection mIgnoredItems = new HashSet(Arrays.asList(new String[]{"itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater", + public final HashSet mRegisteredOres = new HashSet(10000); + public final ArrayList mSoundNames = new ArrayList(); + public final ArrayList mSoundItems = new ArrayList(); + public final ArrayList mSoundCounts = new ArrayList(); + private final Collection mEvents = new HashSet(); + private final Collection mIgnoredItems = new HashSet(Arrays.asList(new String[]{"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", @@ -101,7 +96,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 mIgnoredNames = new HashSet(Arrays.asList(new String[]{"grubBee", "chainLink", "candyCane", "bRedString", "bVial", + private final Collection mIgnoredNames = new HashSet(Arrays.asList(new String[]{"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", @@ -119,7 +114,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { "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"})); - private final Collection mInvalidNames = new HashSet(Arrays.asList(new String[]{"diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre", + private final Collection mInvalidNames = new HashSet(Arrays.asList(new String[]{"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", @@ -1128,14 +1123,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { tReRegisteredMaterial = (Materials) i$.next(); } aMaterial.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore})); - + if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) && !aPrefix.isIgnored(aMaterial)) { List 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); } - + switch (aPrefix) { case crystal: if ((aMaterial == Materials.CertusQuartz) || (aMaterial == Materials.NetherQuartz) || (aMaterial == Materials.Fluix)) { @@ -1540,11 +1535,11 @@ 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)); @@ -1559,7 +1554,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { if(aID>=1000){ - int ID = aID-1000; + int ID = aID-1000; switch(ID){ case 0: return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer); @@ -1580,11 +1575,11 @@ 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); @@ -1902,9 +1897,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { tEvent = (OreDictEventContainer) i$.next(); } } - + public static final HashMap chunkData = new HashMap(5000); - + @SubscribeEvent public void handleChunkSaveEvent(ChunkDataEvent.Save event) { @@ -1913,7 +1908,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { int[] tInts = chunkData.get(tPos); if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);}} } - + @SubscribeEvent public void handleChunkLoadEvent(ChunkDataEvent.Load event) { @@ -1924,7 +1919,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { if(chunkData.containsKey(tPos)){ chunkData.remove(tPos);} chunkData.put(tPos, new int[]{ tOil}); - } + } public static class OreDictEventContainer { public final OreDictionary.OreRegisterEvent mEvent; diff --git a/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java new file mode 100644 index 0000000000..cafde84836 --- /dev/null +++ b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java @@ -0,0 +1,58 @@ +package gregtech.loaders.misc; + +import java.io.File; +import java.util.HashMap; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; + +public class OreProcessingConfiguration + implements Runnable +{ + private final Configuration mConfiguration; + private final HashMap mEnabledMaterials; + public OreProcessingConfiguration(File aModConfigurationDirectory) + { + this.mEnabledMaterials = new HashMap(); + this.mConfiguration = + new Configuration(new File(new File(aModConfigurationDirectory, "GregTech"), "OreProcessing.cfg")); + this.mConfiguration.load(); + this.loadConfiguration(); + if (this.mConfiguration.hasChanged()) + { + this.mConfiguration.save(); + } + } + private void loadConfiguration() + { + for (Materials tMaterial : GregTech_API.sGeneratedMaterials) + { + if (tMaterial != null && tMaterial != Materials._NULL) + { + String tMaterialName = tMaterial.name(); + boolean tDefaultValue = (tMaterial.mTypes & 8) != 0; + Property tProperty = + this.mConfiguration.get("processores", tMaterialName + "_" + tDefaultValue, tDefaultValue); + this.mEnabledMaterials.put(tMaterialName, tProperty.getBoolean(tDefaultValue)); + } + } + } + @Override + public void run() + { + for (String tMaterialName : this.mEnabledMaterials.keySet()) + { + if (this.mEnabledMaterials.get(tMaterialName)) + { + Materials.valueOf(tMaterialName).mTypes |= 8; + } + else if ((Materials.valueOf(tMaterialName).mTypes & 8) != 0) + { + Materials.valueOf(tMaterialName).mTypes ^= 8; + } + } + } +} + -- cgit From 680676e411c8ae67e2a81cf498598b208f95d4f8 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Tue, 24 May 2016 00:04:36 +0100 Subject: Redone Tooltips and some scanner info --- .../multi/GT_MetaTileEntity_AdvMiner2.java | 30 ++--- .../multi/GT_MetaTileEntity_AssemblyLine.java | 126 ++++++++++----------- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 8 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 20 ++-- .../multi/GT_MetaTileEntity_DistillationTower.java | 17 +-- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 13 ++- .../multi/GT_MetaTileEntity_FusionComputer.java | 24 ++++ .../multi/GT_MetaTileEntity_HeatExchanger.java | 21 ++-- .../GT_MetaTileEntity_ImplosionCompressor.java | 12 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 15 ++- .../multi/GT_MetaTileEntity_LargeTurbine.java | 36 +++--- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 18 +-- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 19 ++-- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 15 ++- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 15 ++- .../multi/GT_MetaTileEntity_MultiFurnace.java | 14 ++- .../multi/GT_MetaTileEntity_OilCracker.java | 23 ++-- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 17 +-- .../multi/GT_MetaTileEntity_ProcessingArray.java | 18 +-- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 20 ++-- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 12 +- 21 files changed, 293 insertions(+), 200 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java index cb220907b0..e9cc7b34c7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java @@ -44,12 +44,14 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas public String[] getDescription() { return new String[]{ "Controller Block for the Advanced Miner II", - "Size: 3x3x7", "Controller (front middle at bottom)", - "3x3 Base of Solid Steel Casings", - "Also part of Base: MV+ Energy Input Hatch", - "Fluid Input Hatch, Output Bus and Maintainance Hatch", - "3x Solid Steel Casings on top the Center of the base", - "Steel Frame Boxes on each side and 3 more on top"}; + "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", + "3x1x3 Base of Solid Steel Casings", + "1x3x1 Solid Steel Casing pillar (Center of base)", + "1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)", + "1x Input Hatch (Any bottom layer casing)", + "1x Output Bus (Any bottom layer casing)", + "1x Maintenance Hatch (Any bottom layer casing)", + "1x MV+ Energy Hatch (Any bottom layer casing)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -58,7 +60,7 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas } return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; } - + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png"); } @@ -112,18 +114,18 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas } } if (mMineList.isEmpty()) { - if(getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock){ - if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) { - moveOneDown(); - } - }else{return false;} + if(getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock){ + if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) { + moveOneDown(); + } + }else{return false;} } ArrayList tDrops = new ArrayList(); if (!mMineList.isEmpty()) { Block tMineBlock = getBaseMetaTileEntity().getBlockOffset(mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ); tDrops = tMineBlock.getDrops(getBaseMetaTileEntity().getWorld(), mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ, getBaseMetaTileEntity().getMetaIDOffset(mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ), 1); if (!tDrops.isEmpty()) { - ItemData tData = GT_OreDictUnificator.getItemData(tDrops.get(0).copy()); + ItemData tData = GT_OreDictUnificator.getItemData(tDrops.get(0).copy()); if (tData.mPrefix != OrePrefixes.crushed&& tData.mMaterial.mMaterial != Materials.Oilsands) { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, tVoltage, null, tDrops.get(0).copy()); if (tRecipe != null) { @@ -291,4 +293,4 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas return new GT_MetaTileEntity_AdvMiner2(this.mName); } -} +} \ No newline at end of file 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 e292c4a1c3..e4a7d0dff5 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 @@ -34,13 +34,13 @@ public class GT_MetaTileEntity_AssemblyLine } public String[] getDescription() { - return new String[]{"Assembly line", - "Size: 3x(2-16)x4, variable lenght", - "Bottom: Steel Casing(or Maintainance or Input Hatch), Input Bus(Last Output Bus), Steel Casing", - "Middle: Reinforced Glass, Assembling Line, Reinforced Glass", - "UpMiddle: Grate Casing(or Controller), Assambling Casing, Grate Casing", - "Top: Steel Casing(or Energy Hatch)", - "Up to 16 repeating slices, last is Output Bus"}; + return new String[]{"Assembly line", + "Size: 3x(2-16)x4, variable length", + "Bottom: Steel Casing(or Maintenance or Input Hatch), Input Bus(Last Output Bus), Steel Casing", + "Middle: Reinforced Glass, Assembling Line, Reinforced Glass", + "UpMiddle: Grate Casing(or Controller), Assembling Casing, Grate Casing", + "Top: Steel Casing(or Energy Hatch)", + "Up to 16 repeating slices, last is Output Bus"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -137,74 +137,74 @@ public class GT_MetaTileEntity_AssemblyLine int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; if (xDir != 0) { - for(int r = 0; r <= 16; r++){ - int i = r*xDir; - - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(0, 0, i)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(0, 0, i)!=10){return false;} - if(!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;} - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i); - if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ + for(int r = 0; r <= 16; r++){ + int i = r*xDir; + + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(0, 0, i)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(0, 0, i)!=10){return false;} + if(!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;} + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i); + if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(0, -2, i) != 0) {return false;} - } - - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i); - if (!addEnergyInputToMachineList(tTileEntity, 16)){ + } + + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i); + if (!addEnergyInputToMachineList(tTileEntity, 16)){ if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {return false;} - } - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(xDir, 0, i)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i)!=9){return false;} - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(xDir,-1, i)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir,-1, i)!=5){return false;} - - - if(aBaseMetaTileEntity.getBlockOffset(xDir*2, 0, i)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(xDir*2, 0, i)!=10){return false;} - if(!aBaseMetaTileEntity.getBlockOffset(xDir*2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;} - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir*2, -2, i); - if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ + } + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(xDir, 0, i)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i)!=9){return false;} + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(xDir,-1, i)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir,-1, i)!=5){return false;} + + + if(aBaseMetaTileEntity.getBlockOffset(xDir*2, 0, i)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(xDir*2, 0, i)!=10){return false;} + if(!aBaseMetaTileEntity.getBlockOffset(xDir*2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;} + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir*2, -2, i); + if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ if (aBaseMetaTileEntity.getBlockOffset(xDir*2, -2, i) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(xDir*2, -2, i) != 0) {return false;} - } - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i); - if (!addInputToMachineList(tTileEntity, 16)){ - if (!addOutputToMachineList(tTileEntity, 16)){;return false; - }else{if(r>0){return true;}else{return false;}} - } - } + } + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i); + if (!addInputToMachineList(tTileEntity, 16)){ + if (!addOutputToMachineList(tTileEntity, 16)){;return false; + }else{if(r>0){return true;}else{return false;}} + } + } }else{ - for(int r = 0; r <= 16; r++){ - int i = r*-zDir; - - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i, 0, 0)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0)!=10){return false;} - if(!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")){return false;} - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0); - if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ + for(int r = 0; r <= 16; r++){ + int i = r*-zDir; + + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i, 0, 0)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0)!=10){return false;} + if(!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")){return false;} + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0); + if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, 0) != 0) {return false;} - } - - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir); - if (!addEnergyInputToMachineList(tTileEntity, 16)){ + } + + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir); + if (!addEnergyInputToMachineList(tTileEntity, 16)){ if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {return false;} - } - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i, 0, zDir)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir)!=9){return false;} - if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i,-1, zDir)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i,-1, zDir)!=5){return false;} - - - if(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir*2)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir*2)!=10){return false;} - if(!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir*2).getUnlocalizedName().equals("blockAlloyGlass")){return false;} - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir*2); - if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ + } + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i, 0, zDir)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir)!=9){return false;} + if(i!=0&&aBaseMetaTileEntity.getBlockOffset(i,-1, zDir)!=GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i,-1, zDir)!=5){return false;} + + + if(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir*2)!=GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir*2)!=10){return false;} + if(!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir*2).getUnlocalizedName().equals("blockAlloyGlass")){return false;} + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir*2); + if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){ if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir*2) != GregTech_API.sBlockCasings2) {return false;} if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir*2) != 0) {return false;} - } - tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir); - if (!addInputToMachineList(tTileEntity, 16)){ - if (!addOutputToMachineList(tTileEntity, 16)){ - }else{if(r>0){return true;}else{return false;}} - } - } - } + } + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir); + if (!addInputToMachineList(tTileEntity, 16)){ + if (!addOutputToMachineList(tTileEntity, 16)){ + }else{if(r>0){return true;}else{return false;}} + } + } + } return false; } @@ -227,4 +227,4 @@ public class GT_MetaTileEntity_AssemblyLine 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_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index fd3546f94b..f00563790c 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 @@ -43,7 +43,11 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } public String[] getDescription() { - return new String[]{"To get your first Steel", "Multiblock: 3x3x4 hollow with opening on top", "32 Bronze Plated Bricks required"}; + return new String[]{ + "Controller Block for the Bronze Blast Furnace", + "How to get your first Steel", + "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", + "Bronze Plated Bricks for the rest (32 at least!)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -338,4 +342,4 @@ public class GT_MetaTileEntity_BronzeBlastFurnace public byte getTileEntityBaseType() { return 0; } -} +} \ 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 edd98c5054..24394ddd98 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 @@ -36,14 +36,14 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock } public String[] getDescription() { - return new String[]{"Charcoal pit controller", - "Place on top of a pile of wood logs", - "Maximum size of logs below 11x11x5", - "No air beween logs alowed", - "Sides and top must be dirt or grass", - "Below logs must be bricks", - "No other blocks can touch logs", - "Turns logs into Brittle Charcoal blocks"}; + return new String[]{ + "Controller for the Charcoal Pit", + "Converts Logs into Brittle Charcoal blocks", + "Max Size(WxHxD): 11x6x11, Controller (Top layer, centered)", + "11x1x11 of Bricks (Bottom layer only)", + "11x5x11 of Logs (Above bottom Brick layer)", + "Only grass/dirt can touch Log blocks", + "No air between logs allowed"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -184,7 +184,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock if (p6) aList2.add(new ChunkPosition(aX, aY, aZ - 1)); return true; } - + public boolean isWoodLog(Block log){ String tTool = log.getHarvestTool(0); return OrePrefixes.log.contains(new ItemStack(log, 1))&& ((tTool != null) && (tTool.equals("axe"))) || (log.getMaterial() == Material.wood); @@ -219,4 +219,4 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock 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_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 15e1de6df3..4d491725d1 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 @@ -41,11 +41,12 @@ public class GT_MetaTileEntity_DistillationTower public String[] getDescription() { return new String[]{ "Controller Block for the Distillation Tower", - "Size: 3x3x6 (Hollow)", "Controller (front bottom)", - "1x Input Hatch (bottom)", - "5x Output Hatch (one each height level besides botton)", - "1x Output Bus (Botton)", "1x Energy Hatch (anywhere)", - "1x Maintenance Hatch (anywhere)", + "Size(WxHxD): 3x6x3 (Hollow), Controller (Front bottom)", + "1x Input Hatch (Any bottom layer casing)", + "5x Output Hatch (Any casing besides bottom layer)", + "1x Output Bus (Any bottom layer casing)", + "1x Maintenance Hatch (Any casing)", + "1x Energy Hatch (Any casing)", "Clean Stainless Steel Casings for the rest (26 at least!)"}; } @@ -87,12 +88,12 @@ public class GT_MetaTileEntity_DistillationTower } } } - + long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, 1); if (tFluids.length > 0) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, new ItemStack[]{}); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, new ItemStack[]{}); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); @@ -114,7 +115,7 @@ public class GT_MetaTileEntity_DistillationTower this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; this.mOutputFluids = tRecipe.mFluidOutputs.clone(); - ArrayUtils.reverse(mOutputFluids); + ArrayUtils.reverse(mOutputFluids); updateSlots(); return true; } 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 0c6463fcc8..bdeaa4f2df 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 @@ -35,7 +35,16 @@ public class GT_MetaTileEntity_ElectricBlastFurnace } public String[] getDescription() { - return new String[]{"Controller Block for the Blast Furnace", "Size: 3x3x4 (Hollow)", "Controller (front middle at bottom)", "16x Heating Coils (two middle Layers, hollow)", "1x Input (one of bottom)", "1x Output (one of bottom)", "1x Energy Hatch (one of bottom)", "1x Maintenance Hatch (one of bottom)", "1x Muffler Hatch (top middle)", "Heat Proof Machine Casings for the rest"}; + return new String[]{ + "Controller Block for the Blast Furnace", + "Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)", + "16x Heating Coils (Two middle Layers, hollow)", + "1x Input (Any bottom layer casing)", + "1x Output (Any bottom layer casing)", + "1x Energy Hatch (Any bottom layer casing)", + "1x Maintenance Hatch (Any bottom layer casing)", + "1x Muffler Hatch (Top middle)", + "Heat Proof Machine Casings for the rest"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -210,4 +219,4 @@ public class GT_MetaTileEntity_ElectricBlastFurnace 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_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index f6edc08e3d..7d950a490b 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 @@ -440,4 +440,28 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + @Override + public String[] getInfoData() { + String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; + float plasmaOut = 0; + int powerRequired = 0; + if (this.mLastRecipe != null) { + powerRequired = this.mLastRecipe.mEUt; + if (this.mLastRecipe.getFluidOutput(0) != null) { + plasmaOut = (float)this.mLastRecipe.getFluidOutput(0).amount / (float)this.mLastRecipe.mDuration; + } + } + + return new String[]{ + "Fusion Reactor MK "+tier, + "EU Required: "+powerRequired+"EU/t", + "Stored EU: "+mEUStore+" / "+maxEUStore(), + "Plasma Output: "+plasmaOut+"L/t"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } } \ No newline at end of file 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 a1d94e4241..0127a4332a 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 @@ -37,16 +37,15 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc public String[] getDescription() { return new String[]{ - "Controller Block for the Heat Exchanger", - "Size: 3x3x4", - "Controller (front middle at bottom)", - "3x3x4 of Stable Titanium Casing (hollow, Min 24!)", - "2 Titanium Pipe Casing Blocks inside the Hollow Casing", - "1x Distillated Water Input (one of the Casings)", - "min 1 Steam Output (one of the Casings)", - "1x Maintenance Hatch (one of the Casings)", - "1x Hot Fluid Input (botton Center)", - "1x Cold Fluid Output (top Center)"}; + "Controller Block for the Heat Exchanger", + "Size(WxHxD): 3x4x3, Controller (Front middle at bottom)", + "3x3x4 of Stable Titanium Casing (hollow, Min 24!)", + "2 Titanium Pipe Casing Blocks (Inside the Hollow Casing)", + "1x Distillated Water Input (Any casing)", + "min 1 Steam Output (Any casing)", + "1x Hot Fluid Input (Bottom center)", + "1x Cold Fluid Output (Top Center)", + "1x Maintenance Hatch (Any casing)"}; } @Override @@ -288,4 +287,4 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_HeatExchanger(this.mName); } -} +} \ 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 a611843530..6d61e2b01f 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 @@ -33,7 +33,15 @@ public class GT_MetaTileEntity_ImplosionCompressor } public String[] getDescription() { - return new String[]{"Controller Block for the Implosion Compressor", "Size: 3x3x3 (Hollow)", "Controller (front centered)", "1x Input (anywhere)", "1x Output (anywhere)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "1x Muffler Hatch (anywhere)", "Solid Steel Casings for the rest (16 at least!)"}; + return new String[]{ + "Controller Block for the Implosion Compressor", + "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", + "1x Input Bus (Any casing)", + "1x Output Bus (Any casing)", + "1x Maintenance Hatch (Any casing)", + "1x Muffler Hatch (Any casing)", + "1x Energy Hatch (Any casing)", + "Solid Steel Casings for the rest (16 at least!)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -144,4 +152,4 @@ public class GT_MetaTileEntity_ImplosionCompressor 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_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index ea4e6ce98f..51715a54c1 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 @@ -32,7 +32,18 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public String[] getDescription() { - return new String[]{"Controller Block for the Large Boiler", "Size: 3x3x5", "Controller (front middle in Fireboxes)", "3x3 of Fire Boxes (bottom Layer, Min 3!)", "3x3x4 of Casing (above Fireboxes, hollow, Min 24!)", "3 Pipe Casing Blocks inside the Hollow Casing", "1x Input (one of Fireboxes)", "1x Maintenance Hatch (one of Fireboxes)", "1x Muffler Hatch (one of Fireboxes)", "1x Fluid Output (one of Main Casing)","Produces "+getEUt()*40+"L/sec steam","Runs "+(runtimeBoost(20)/20f)+" sec per coal of fuel","Refined liquid fuels have 1/4 efficiency"}; + return new String[]{ + "Controller Block for the Large Boiler", + "Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam/sec for 1 Coal", + "Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)", + "3x1x3 of Fire Boxes (Bottom layer, Min 3)", + "3x4x3 of Casing (Above Fireboxes, hollow, Min 24!)", + "3 Pipe Casing Blocks (Inside the Hollow Casing)", + "1x Input Hatch/Bus (Any Firebox)", + "1x Output Hatch (Any Firebox)", + "1x Maintenance Hatch (Any Firebox)", + "1x Muffler Hatch (Any Firebox)", + "Refined liquid fuels have 1/4 efficiency"}; } public abstract Block getCasingBlock(); @@ -227,4 +238,4 @@ public abstract class GT_MetaTileEntity_LargeBoiler 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_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 14098be28c..458b65bda0 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 @@ -20,6 +20,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M protected int baseEff = 0; protected int optFlow = 0; + protected int realOptFlow = 0; + protected int storedFluid = 0; protected int counter = 0; public GT_MetaTileEntity_LargeTurbine(int aID, String aName, String aNameRegional) { @@ -33,7 +35,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M public boolean isCorrectMachinePart(ItemStack aStack) { return getMaxEfficiency(aStack) > 0; } - + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); } @@ -190,29 +192,31 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M public boolean explodesOnComponentBreak(ItemStack aStack) { return true; } - + @Override public String[] getInfoData() { - String tRunning = mMaxProgresstime>0 ? "Turbine running":"Turbine stopped"; - String tMaintainance = getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" ; - int tDura = 0; - - if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - tDura = (int) ((100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); - } - + String tRunning = mMaxProgresstime>0 ? "Turbine running":"Turbine stopped"; + String tMaintainance = getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" ; + int tDura = 0; + + if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { + tDura = (int) ((100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + } + return new String[]{ "Large Turbine", tRunning, - "Current output: "+mEUt+" EU/t", - "Current speed: "+(mEfficiency/100)+"%", - tMaintainance, - "Turbine Damage: "+tDura+"%"}; + "Current Output: "+mEUt+" EU/t", + "Optimal Flow: "+realOptFlow+" L/t", + "Fuel Remaining: "+storedFluid+"L", + "Current Speed: "+(mEfficiency/100)+"%", + "Turbine Damage: "+tDura+"%", + tMaintainance}; } @Override public boolean isGivingInformation() { return true; } - -} + +} \ No newline at end of file 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 a914ab3a12..0e59e9e9c3 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 @@ -35,13 +35,13 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT public String[] getDescription() { return new String[]{ "Controller Block for the Large Gas Turbine", - "Size: 3x4x3 (Hollow)", "Controller (front centered)", - "1x Input Hatch (side centered)", - "1x Dynamo Hatch (back centered)", - "1x Maintenance Hatch (side centered)", - "1x Muffler Hatch (side centered)", - "Stainless Steel Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (inside controller GUI)"}; + "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", + "1x Input Hatch (Side centered)", + "1x Maintenance Hatch (Side centered)", + "1x Muffler Hatch (Side centered)", + "1x Dynamo Hatch (Back centered)", + "Titanium Turbine Casings for the rest (24 at least!)", + "Needs a Turbine Item (Inside controller GUI)"}; } public int getFuelValue(FluidStack aLiquid) { @@ -89,6 +89,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); actualOptimalFlow = (int) (aOptFlow / fuelValue); + this.realOptFlow = actualOptimalFlow; int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. int flow = 0; @@ -99,6 +100,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT flow = aFluids.get(i).amount; // Get all (steam) in hatch flow = Math.min(flow, Math.min(remainingFlow, (int) (actualOptimalFlow * 1.25f))); // 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; remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used } @@ -124,4 +126,4 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT