port terralizationcompat stuff to mekanism ce
fixes #30 also voiceserver is now disabled by default
This commit is contained in:
parent
293f109198
commit
fb92953775
5 changed files with 76 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
dataStream.writeDouble(general.heatPerFuelTick);
|
||||
dataStream.writeBoolean(general.allowTransmitterAlloyUpgrade);
|
||||
dataStream.writeBoolean(general.allowProtection);
|
||||
dataStream.writeBoolean(general.EnableQuartzCompat);
|
||||
dataStream.writeBoolean(general.EnableDiamondCompat);
|
||||
dataStream.writeBoolean(general.EnablePoorOresCompat);
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
@ -162,6 +165,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
general.heatPerFuelTick = dataStream.readDouble();
|
||||
general.allowTransmitterAlloyUpgrade = dataStream.readBoolean();
|
||||
general.allowProtection = dataStream.readBoolean();
|
||||
general.EnableQuartzCompat = dataStream.readBoolean();
|
||||
general.EnableDiamondCompat = dataStream.readBoolean();
|
||||
general.EnablePoorOresCompat = dataStream.readBoolean();
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue