Merge branch 'master' into development

Conflicts:
	src/main/java/mekanism/common/CommonProxy.java
	src/main/java/mekanism/common/Mekanism.java
	src/main/java/mekanism/common/item/ItemAtomicDisassembler.java
	src/main/java/mekanism/common/network/PacketConfigSync.java
	src/main/java/mekanism/generators/common/MekanismGenerators.java
This commit is contained in:
Aidan C. Brady 2015-03-04 14:30:05 -05:00
commit b2e532964c
5 changed files with 19 additions and 15 deletions

View file

@ -27,6 +27,8 @@ public class MekanismConfig
public static int maxUpgradeMultiplier = 10; public static int maxUpgradeMultiplier = 10;
public static int userWorldGenVersion = 0; public static int userWorldGenVersion = 0;
public static double ENERGY_PER_REDSTONE = 10000; public static double ENERGY_PER_REDSTONE = 10000;
public static int ETHENE_BURN_TIME = 40;
public static double DISASSEMBLER_USAGE = 10;
public static EnergyType activeType = EnergyType.J; public static EnergyType activeType = EnergyType.J;
public static TempType tempUnit = TempType.K; public static TempType tempUnit = TempType.K;
public static double TO_IC2; public static double TO_IC2;

View file

@ -226,7 +226,9 @@ public class CommonProxy
general.FROM_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToRF", 2.5D).getDouble(2.5D); general.FROM_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToRF", 2.5D).getDouble(2.5D);
general.TO_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "RFToJoules", 0.4D).getDouble(0.4D); general.TO_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "RFToJoules", 0.4D).getDouble(0.4D);
general.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, "Determines Electrolytic Separator usage").getDouble(200D); general.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, "Determines Electrolytic Separator usage").getDouble(200D);
general.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40).getInt(40);
general.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D); general.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D);
general.DISASSEMBLER_USAGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisassemblerEnergyUsage", 10).getInt(10);
general.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123, null, 1, 65535).getInt(); general.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123, null, 1, 65535).getInt();
//If this is less than 1, upgrades make machines worse. If less than 0, I don't even know. //If this is less than 1, upgrades make machines worse. If less than 0, I don't even know.
general.maxUpgradeMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, null, 1, Integer.MAX_VALUE).getInt(); general.maxUpgradeMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, null, 1, Integer.MAX_VALUE).getInt();

View file

@ -8,9 +8,9 @@ import java.util.Set;
import mekanism.api.Coord4D; import mekanism.api.Coord4D;
import mekanism.api.EnumColor; import mekanism.api.EnumColor;
import mekanism.api.MekanismConfig.general;
import mekanism.api.util.ListUtils; import mekanism.api.util.ListUtils;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -28,8 +28,7 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
public class ItemAtomicDisassembler extends ItemEnergized public class ItemAtomicDisassembler extends ItemEnergized
{ {
public double ENERGY_USAGE = 10; public double HOE_USAGE = 10 * general.DISASSEMBLER_USAGE;
public double HOE_USAGE = 100;
public ItemAtomicDisassembler() public ItemAtomicDisassembler()
{ {
@ -80,10 +79,10 @@ public class ItemAtomicDisassembler extends ItemEnergized
{ {
if(block.getBlockHardness(world, x, y, z) != 0.0D) if(block.getBlockHardness(world, x, y, z) != 0.0D)
{ {
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*getEfficiency(itemstack))); setEnergy(itemstack, getEnergy(itemstack) - (general.DISASSEMBLER_USAGE*getEfficiency(itemstack)));
} }
else { else {
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*(getEfficiency(itemstack))/2)); setEnergy(itemstack, getEnergy(itemstack) - (general.DISASSEMBLER_USAGE*(getEfficiency(itemstack))/2));
} }
return true; return true;
@ -125,7 +124,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
for(Coord4D coord : found) for(Coord4D coord : found)
{ {
if(coord.equals(orig) || getEnergy(itemstack) < (ENERGY_USAGE*getEfficiency(itemstack))) if(coord.equals(orig) || getEnergy(itemstack) < (general.DISASSEMBLER_USAGE*getEfficiency(itemstack)))
{ {
continue; continue;
} }
@ -138,7 +137,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
block2.breakBlock(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, block, meta); block2.breakBlock(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, block, meta);
block2.dropBlockAsItem(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta, 0); block2.dropBlockAsItem(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta, 0);
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*getEfficiency(itemstack))); setEnergy(itemstack, getEnergy(itemstack) - (general.DISASSEMBLER_USAGE*getEfficiency(itemstack)));
} }
} }
} }

View file

@ -44,7 +44,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
dataStream.writeDouble(general.FROM_TE); dataStream.writeDouble(general.FROM_TE);
dataStream.writeDouble(general.TO_TE); dataStream.writeDouble(general.TO_TE);
dataStream.writeDouble(general.FROM_H2); dataStream.writeDouble(general.FROM_H2);
dataStream.writeInt(general.ETHENE_BURN_TIME);
dataStream.writeDouble(general.ENERGY_PER_REDSTONE); dataStream.writeDouble(general.ENERGY_PER_REDSTONE);
dataStream.writeDouble(general.DISASSEMBLER_USAGE);
dataStream.writeInt(general.VOICE_PORT); dataStream.writeInt(general.VOICE_PORT);
dataStream.writeInt(general.maxUpgradeMultiplier); dataStream.writeInt(general.maxUpgradeMultiplier);
dataStream.writeInt(general.activeType.ordinal()); dataStream.writeInt(general.activeType.ordinal());
@ -104,7 +106,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
general.FROM_TE = dataStream.readDouble(); general.FROM_TE = dataStream.readDouble();
general.TO_TE = dataStream.readDouble(); general.TO_TE = dataStream.readDouble();
general.FROM_H2 = dataStream.readDouble(); general.FROM_H2 = dataStream.readDouble();
general.ETHENE_BURN_TIME = dataStream.readInt();
general.ENERGY_PER_REDSTONE = dataStream.readDouble(); general.ENERGY_PER_REDSTONE = dataStream.readDouble();
general.DISASSEMBLER_USAGE = dataStream.readDouble();
general.VOICE_PORT = dataStream.readInt(); general.VOICE_PORT = dataStream.readInt();
general.maxUpgradeMultiplier = dataStream.readInt(); general.maxUpgradeMultiplier = dataStream.readInt();
general.activeType = EnergyType.values()[dataStream.readInt()]; general.activeType = EnergyType.values()[dataStream.readInt()];

View file

@ -1,5 +1,7 @@
package mekanism.generators.common; package mekanism.generators.common;
import io.netty.buffer.ByteBuf;
import java.io.IOException; import java.io.IOException;
import mekanism.api.MekanismConfig.general; import mekanism.api.MekanismConfig.general;
@ -14,12 +16,12 @@ import mekanism.common.Version;
import mekanism.common.base.IModule; import mekanism.common.base.IModule;
import mekanism.common.recipe.MekanismRecipe; import mekanism.common.recipe.MekanismRecipe;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.CraftingManager;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
import buildcraft.api.fuels.IFuel;
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
@ -33,11 +35,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import io.netty.buffer.ByteBuf;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
import buildcraft.api.fuels.IFuel;
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") @Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory")
public class MekanismGenerators implements IModule public class MekanismGenerators implements IModule
{ {
@ -126,7 +123,7 @@ public class MekanismGenerators implements IModule
" O ", "OAO", "ECE", Character.valueOf('O'), "ingotOsmium", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), "circuitBasic" " O ", "OAO", "ECE", Character.valueOf('O'), "ingotOsmium", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), "circuitBasic"
})); }));
FuelHandler.addGas(GasRegistry.getGas("ethene"), 40, general.FROM_H2 + generators.bioGeneration * 80); //1mB hydrogen + 2*bioFuel/tick*200ticks/100mB * 20x efficiency bonus FuelHandler.addGas(GasRegistry.getGas("ethene"), general.ETHENE_BURN_TIME, general.FROM_H2 + generators.bioGeneration * 2 * general.ETHENE_BURN_TIME); //1mB hydrogen + 2*bioFuel/tick*200ticks/100mB * 20x efficiency bonus
} }
@Override @Override