diff options
Diffstat (limited to 'src')
7 files changed, 188 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 182953c947..a7de15d76d 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -8,7 +8,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.lang.reflect.Field; -import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; @@ -42,7 +41,6 @@ import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.oredict.OreDictionary; @@ -72,6 +70,11 @@ public class GTplusplus implements ActionListener { "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)"); disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false, "Disables EnderIO Integration."); + MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false, + "Makes many machines display lots of debug logging."); + showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false, + "Makes all items hidden from NEI display."); + // Machines enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false, diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index 6fe51ea6b6..99573d808c 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -34,7 +34,7 @@ public class CORE { public static final String name = "GT++"; public static final String MODID = "miscutils"; - public static final String VERSION = "1.6.52-release"; + public static final String VERSION = "1.6.55-release"; public static String MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase(); public static String USER_COUNTRY = GeoUtils.determineUsersCountry(); public static boolean isModUpToDate = Utils.isModUpToDate(); @@ -105,6 +105,7 @@ public class CORE { //Debug public static boolean disableEnderIOIntegration = false; public static boolean MACHINE_INFO = true; + public static boolean showHiddenNEIItems = false; //Tools public static boolean enableSkookumChoochers = true; @@ -121,7 +122,6 @@ public class CORE { public static boolean enableAlternativeDivisionSigilRecipe = false; //Feature Related - public static boolean enableCustomAlvearyBlocks = false; public static boolean enableCustomCircuits = true; public static boolean enableOldGTcircuits = false; diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java index e15e50ddf4..e75ccce204 100644 --- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java +++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java @@ -43,6 +43,7 @@ public class LoadedMods { public static boolean DreamCraft = false; //GT: New Horizons public static boolean BiomesOPlenty = false; public static boolean PamsHarvestcraft = false; + public static boolean GalacticraftCore = false; @@ -220,6 +221,11 @@ public class LoadedMods { Utils.LOG_INFO("Components enabled for: Baubles"); totalMods++; } + if (Loader.isModLoaded("GalacticraftCore") == true){ + GalacticraftCore = true; + Utils.LOG_INFO("Components enabled for: Galacticraft Core"); + totalMods++; + } if (Loader.isModLoaded("OpenComputers") == true){ OpenComputers = true; Utils.LOG_INFO("Components enabled for: OpenComputers"); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java index 960506cbc3..f4be860e36 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java @@ -5,7 +5,13 @@ import cpw.mods.fml.common.Loader; import gregtech.api.enums.*; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.util.*; +import gregtech.common.GT_Proxy; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.item.ItemUtils; +import gtPlusPlus.core.util.recipe.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import net.minecraft.item.ItemStack; @@ -76,7 +82,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { GT_Values.RA.addAssemblerRecipe(GregtechItemList.Old_Circuit_Master.get(2L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb.get(1L, new Object[0]), 512, 1024); GT_Values.RA.addAssemblerRecipe(GregtechItemList.Old_Circuit_Master.get(2L, new Object[0]), GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.get(18L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb.get(1L, new Object[0]), 512, 1024); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), GregtechItemList.Old_Empty_Board_Basic.get(1L, new Object[0]), 32, 16); - + Materials plasticType = Materials.get("Polytetrafluoroethylene") != null ? Materials.get("Polytetrafluoroethylene") : Materials.Plastic; GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, plasticType, 1L), GregtechItemList.Old_Empty_Board_Elite.get(1L, new Object[0]), 32, 256); @@ -90,6 +96,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { hideCircuitsNEI(); addCircuitRecipes(); removeNewCircuits(); + generateTradeRecipes(); return true; } @@ -107,7 +114,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { ItemList.Circuit_Elite.set(GregtechItemList.Old_Circuit_Elite.get(1)); ItemList.Circuit_Master.set(GregtechItemList.Old_Circuit_Master.get(1)); ItemList.Circuit_Ultimate.set(GregtechItemList.Old_Circuit_Ultimate.get(1)); - + //set data orbs and sticks to their new replacements ItemList.Tool_DataStick.set(GregtechItemList.Old_Tool_DataStick.get(1)); ItemList.Tool_DataOrb.set(GregtechItemList.Old_Tool_DataOrb.get(1)); @@ -125,9 +132,149 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { return true; } + private static boolean generateTradeRecipes(){ + + //Data stick and Data orbs. + //GT Type to GT++ Type + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1), null, null, + null, null, null, + GregtechItemList.Old_Tool_DataStick.get(1)); + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1), null, null, + null, null, null, + GregtechItemList.Old_Tool_DataOrb.get(1)); + + //GT++ Type to GT Type + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + GregtechItemList.Old_Tool_DataStick.get(1), null, null, + null, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1)); + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + GregtechItemList.Old_Tool_DataOrb.get(1), null, null, + null, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1)); + + + + //Primitive + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32700", 32700, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitPrimitive", 1)); + + //Basic + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32701", 32701, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32078", 32078, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); + + //Good + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); + + //Advanced + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); + + //Data + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32704", 32704, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 1)); + + //Elite + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32705", 32705, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 1)); + + //Master + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32706", 32706, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 1)); + + + + //Components + //Green Chip + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32713", 32713, 1)}, + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.get(1)); + //Blue Chip + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32714", 32714, 1)}, + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.get(1)); + + //Basic Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32710", 32710, 1)}, + GregtechItemList.Old_Circuit_Board_Basic.get(1)); + //Advanced Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32711", 32711, 1)}, + GregtechItemList.Old_Circuit_Board_Advanced.get(1)); + //Elite Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32712", 32712, 1)}, + GregtechItemList.Old_Circuit_Board_Elite.get(1)); + + + //remove a few recipes + GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32070", 32070, 1)); + GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32069", 32069, 1)); + if (LoadedMods.Extra_Utils){ + ItemStack EQU = ItemUtils.simpleMetaStack("ExtraUtilities:enderQuarryUpgrade", 0, 1); + if (EQU != null){ + GT_ModHandler.removeRecipeByOutput(EQU); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.simpleMetaStack("ExtraUtilities:decorativeBlock1:12", 12, 1), + GregtechItemList.Old_Circuit_Master.get(1), + EQU, + 80*20, + 2); + } + } + if (LoadedMods.GalacticraftCore){ + ItemStack ACW = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:14", 14, 1); + if (ACW != null){ + GT_ModHandler.removeRecipeByOutput(ACW); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), + GregtechItemList.Old_Circuit_Board_Advanced.get(1), + ACW, + 160*20, + 4); + } + ItemStack ACW2 = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:13", 13, 1); + if (ACW2 != null){ + GT_ModHandler.removeRecipeByOutput(ACW2); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), + GregtechItemList.Old_Circuit_Board_Basic.get(1), + ACW2, + 80*20, + 2); + } + } + + return true; + } + private static boolean hideCircuitsNEI(){ Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); - if (isNEILoaded){ + if (isNEILoaded && !CORE.configSwitches.showHiddenNEIItems){ Utils.LOG_INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI."); String[] CircuitToHide = { "Circuit_Board_Basic", @@ -224,7 +371,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { for (String component : CircuitToHide){ try { - API.hideItem(ItemList.valueOf(component).get(1L, new Object[0])); + API.hideItem(ItemList.valueOf(component).get(1L, new Object[0])); } catch (IllegalArgumentException I){ Utils.LOG_INFO("Could not find "+component+" in the Gregtech item list."); Utils.LOG_INFO("This is NOT an error, simply a notification."); diff --git a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java index 3699e19be6..f3f928cbca 100644 --- a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java +++ b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java @@ -208,4 +208,26 @@ public class NBTUtils { } } + + + //Botania soulbind handling + public static boolean setBotanicaSoulboundOwner(ItemStack aStack, String aName) { + final String TAG_SOULBIND = "soulbind"; + NBTTagCompound tNBT = getNBT(aStack); + tNBT.setString(TAG_SOULBIND, aName); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + if (NBTUtils.doesStringExist(aStack, TAG_SOULBIND)){ + return true; + } + else { + return false; + } + } + + public static String getBotanicaSoulboundOwner(ItemStack aStack) { + final String TAG_SOULBIND = "soulbind"; + NBTTagCompound tNBT = getNBT(aStack); + return tNBT.getString(TAG_SOULBIND); + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java index 144784c8ac..5b8a3a30c9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java @@ -44,7 +44,7 @@ extends GregtechMeta_MultiBlockBase { return new String[]{ "Controller Block for the Industrial Thermal Centrifuge", "60% faster than using single block machines of the same voltage", - "Size: 3x2x3 [WxLxH] (Hollow)", "Controller (front centered)", + "Size: 3x2x3 [LxHxW]", "Controller (front centered)", "1x Input Bus (Any casing)", "1x Output Bus (Any casing)", "1x Maintenance Hatch (Any casing)", diff --git a/src/resources/mcmod.info b/src/resources/mcmod.info index 4ffd18d900..b5740f2f2f 100644 --- a/src/resources/mcmod.info +++ b/src/resources/mcmod.info @@ -5,7 +5,7 @@ "description": "Adds a few various Multiblocks, Machines, etc to Gregtech and a plethora of other mods (Nearly 30!)", "credits": "", "logoFile": "", - "version": "1.6.52-release", + "version": "1.6.55-release", "mcversion": "1.7.10", "url": "https://github.com/draknyte1/GTplusplus/wiki", "updateUrl": "https://github.com/draknyte1/GTplusplus/releases/latest", |