diff --git a/src/main/java/mekanism/api/MekanismConfig.java b/src/main/java/mekanism/api/MekanismConfig.java index e0167926f..b10ec0de2 100644 --- a/src/main/java/mekanism/api/MekanismConfig.java +++ b/src/main/java/mekanism/api/MekanismConfig.java @@ -14,7 +14,7 @@ public class MekanismConfig public static boolean controlCircuitOreDict = true; public static boolean logPackets = false; public static boolean dynamicTankEasterEgg = false; - public static boolean voiceServerEnabled = true; + public static boolean voiceServerEnabled = false; public static boolean cardboardSpawners = true; public static boolean enableWorldRegeneration = true; public static boolean spawnBabySkeletons = true; @@ -67,6 +67,9 @@ public class MekanismConfig public static double heatPerFuelTick = 4; public static boolean allowTransmitterAlloyUpgrade; public static boolean allowProtection = true; + public static boolean EnableQuartzCompat; + public static boolean EnableDiamondCompat; + public static boolean EnablePoorOresCompat; } public static class client diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index d1ed245a6..80d47faf8 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -252,7 +252,7 @@ public class CommonProxy implements IGuiProvider general.controlCircuitOreDict = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true).getBoolean(); general.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false).getBoolean(); general.dynamicTankEasterEgg = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false).getBoolean(); - general.voiceServerEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoiceServerEnabled", true).getBoolean(); + general.voiceServerEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoiceServerEnabled", false).getBoolean(); general.cardboardSpawners = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true).getBoolean(); general.enableWorldRegeneration = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableWorldRegeneration", false).getBoolean(); general.spawnBabySkeletons = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SpawnBabySkeletons", true).getBoolean(); @@ -302,6 +302,10 @@ public class CommonProxy implements IGuiProvider general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean(); general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean(); + + general.EnableQuartzCompat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableQuartzCompat", true).getBoolean(); + general.EnableDiamondCompat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableDiamondCompat", true).getBoolean(); + general.EnablePoorOresCompat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnablePoorOresCompat", true).getBoolean(); String s = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyType", "J", null, new String[]{"J", "RF", "MJ", "EU"}).getString(); diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index 9114754a1..3a3b6d3aa 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; +import cpw.mods.fml.common.event.*; import mekanism.api.Coord4D; import mekanism.api.EnumColor; import mekanism.api.MekanismAPI; @@ -124,13 +125,6 @@ import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLInterModComms; -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.event.FMLServerStoppingEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; @@ -1329,6 +1323,11 @@ public class Mekanism logger.info("Hooking complete."); } + @Mod.EventHandler + public void onServerAboutToStart(FMLServerAboutToStartEvent event) { + OreDictManager.terralizationcompat(); + } + @SubscribeEvent public void onEnergyTransferred(EnergyTransferEvent event) { diff --git a/src/main/java/mekanism/common/integration/OreDictManager.java b/src/main/java/mekanism/common/integration/OreDictManager.java index 37d6e821f..ab061afc9 100644 --- a/src/main/java/mekanism/common/integration/OreDictManager.java +++ b/src/main/java/mekanism/common/integration/OreDictManager.java @@ -7,10 +7,13 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import mekanism.api.ItemRetriever; +import mekanism.api.MekanismConfig; import mekanism.api.gas.GasRegistry; import mekanism.api.gas.GasStack; import mekanism.api.infuse.InfuseObject; import mekanism.api.infuse.InfuseRegistry; +import mekanism.api.recipe.RecipeHelper; import mekanism.api.util.StackUtils; import mekanism.common.Mekanism; import mekanism.common.MekanismItems; @@ -384,4 +387,56 @@ public final class OreDictManager } } } + public static void terralizationcompat() { + if (MekanismConfig.general.EnableQuartzCompat) { + // Enrich quartz dust into quartz + for (ItemStack ore : OreDictionary.getOres("dustQuartz")) { + RecipeHelper.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.quartz)); + } + for (ItemStack ore : OreDictionary.getOres("dustNetherQuartz")) { + RecipeHelper.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.quartz)); + } + // Enrich quartz ore into 2 quartz dust + for (ItemStack ore : OreDictionary.getOres("dustQuartz")) { + RecipeHelper.addEnrichmentChamberRecipe(new ItemStack(Blocks.quartz_ore), StackUtils.size(ore, 2)); + } + for (ItemStack ore : OreDictionary.getOres("dustNetherQuartz")) { + RecipeHelper.addEnrichmentChamberRecipe(new ItemStack(Blocks.quartz_ore), StackUtils.size(ore, 2)); + } + } + // Add gemdiamond oredict for compressed diamond + if (MekanismConfig.general.EnableDiamondCompat) { + for (ItemStack ore : OreDictionary.getOres("gemDiamond")) { + InfuseRegistry.registerInfuseObject(ore, new InfuseObject(InfuseRegistry.get("DIAMOND"), 10)); + RecipeHelper.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), ItemRetriever.getItem("CompressedDiamond")); + } + } + if (MekanismConfig.general.EnablePoorOresCompat) { + for (ItemStack ore : OreDictionary.getOres("orePoorIron")) { + for (ItemStack ore2 : OreDictionary.getOres("clumpIron")) { + RecipeHelper.addPurificationChamberRecipe(ore, ore2); + } + } + for (ItemStack ore : OreDictionary.getOres("orePoorGold")) { + for (ItemStack ore2 : OreDictionary.getOres("clumpGold")) { + RecipeHelper.addPurificationChamberRecipe(ore, ore2); + } + } + for (ItemStack ore : OreDictionary.getOres("orePoorCopper")) { + for (ItemStack ore2 : OreDictionary.getOres("clumpCopper")) { + RecipeHelper.addPurificationChamberRecipe(ore, ore2); + } + } + for (ItemStack ore : OreDictionary.getOres("orePoorTin")) { + for (ItemStack ore2 : OreDictionary.getOres("clumpTin")) { + RecipeHelper.addPurificationChamberRecipe(ore, ore2); + } + } + for (ItemStack ore : OreDictionary.getOres("orePoorLead")) { + for (ItemStack ore2 : OreDictionary.getOres("clumpLead")) { + RecipeHelper.addPurificationChamberRecipe(ore, ore2); + } + } + } + } } diff --git a/src/main/java/mekanism/common/network/PacketConfigSync.java b/src/main/java/mekanism/common/network/PacketConfigSync.java index c1836d40b..13cfd69b6 100644 --- a/src/main/java/mekanism/common/network/PacketConfigSync.java +++ b/src/main/java/mekanism/common/network/PacketConfigSync.java @@ -73,6 +73,9 @@ public class PacketConfigSync implements IMessageHandler