From 5a67067f07a87754eb9edd59bb385fdb2714fa64 Mon Sep 17 00:00:00 2001 From: Richard Freimer Date: Sun, 24 Mar 2019 16:40:28 -0400 Subject: [PATCH] Update config to include comments (#108) * Add comments to configs * Removed unused options * Added a few of the newer options mainline Mekanism supports * Also list the default values in the MekanismConfig class for easier comparision * Change spacing slightly for tools config in code * Add some of the missing generator config comments * Config comments for tiers, and add missing comment for MinerSilkMultiplier * Config comments for rest of generators module * Fix which stick to sawdust recipe * Config comments for tools * Config comments for armor * Add warning to DM radius comment, and fix a couple things addressed in PR comments --- .../java/mekanism/client/ClientProxy.java | 71 ++- .../client/gui/GuiDigitalMinerConfig.java | 7 +- .../client/gui/element/GuiVisualsTab.java | 14 +- .../client/render/MinerVisualRenderer.java | 14 +- .../client/render/obj/TransmitterModel.java | 2 +- .../java/mekanism/common/CommonProxy.java | 308 +++++++++---- src/main/java/mekanism/common/Tier.java | 88 ++-- .../common/config/MekanismConfig.java | 166 +++---- .../common/integration/OreDictManager.java | 38 +- .../common/network/PacketConfigSync.java | 4 - .../common/tile/TileEntityDigitalMiner.java | 13 +- .../mekanism/common/world/GenHandler.java | 8 +- .../client/gui/GuiSolarGenerator.java | 3 +- .../common/GeneratorsCommonProxy.java | 65 ++- .../tile/reactor/TileEntityReactorPort.java | 2 +- .../mekanism/tools/common/MekanismTools.java | 422 +++++++++++------- .../tools/common/ToolsCommonProxy.java | 5 +- .../resources/assets/mekanism/lang/en_us.lang | 1 + 18 files changed, 751 insertions(+), 480 deletions(-) diff --git a/src/main/java/mekanism/client/ClientProxy.java b/src/main/java/mekanism/client/ClientProxy.java index 8e849d826..2f30bd077 100644 --- a/src/main/java/mekanism/client/ClientProxy.java +++ b/src/main/java/mekanism/client/ClientProxy.java @@ -14,12 +14,6 @@ import mekanism.client.SparkleAnimation.INodeChecker; import mekanism.client.entity.ParticleLaser; import mekanism.client.gui.GuiAmbientAccumulator; import mekanism.client.gui.GuiBoilerStats; -import mekanism.client.gui.chemical.GuiChemicalCrystallizer; -import mekanism.client.gui.chemical.GuiChemicalDissolutionChamber; -import mekanism.client.gui.chemical.GuiChemicalInfuser; -import mekanism.client.gui.chemical.GuiChemicalInjectionChamber; -import mekanism.client.gui.chemical.GuiChemicalOxidizer; -import mekanism.client.gui.chemical.GuiChemicalWasher; import mekanism.client.gui.GuiCombiner; import mekanism.client.gui.GuiCrusher; import mekanism.client.gui.GuiDictionary; @@ -60,6 +54,12 @@ import mekanism.client.gui.GuiThermalEvaporationController; import mekanism.client.gui.GuiThermoelectricBoiler; import mekanism.client.gui.GuiTransporterConfig; import mekanism.client.gui.GuiUpgradeManagement; +import mekanism.client.gui.chemical.GuiChemicalCrystallizer; +import mekanism.client.gui.chemical.GuiChemicalDissolutionChamber; +import mekanism.client.gui.chemical.GuiChemicalInfuser; +import mekanism.client.gui.chemical.GuiChemicalInjectionChamber; +import mekanism.client.gui.chemical.GuiChemicalOxidizer; +import mekanism.client.gui.chemical.GuiChemicalWasher; import mekanism.client.gui.robit.GuiRobitCrafting; import mekanism.client.gui.robit.GuiRobitInventory; import mekanism.client.gui.robit.GuiRobitMain; @@ -226,8 +226,8 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.TextFormatting; import net.minecraft.util.registry.IRegistry; +import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.client.event.ModelBakeEvent; @@ -235,6 +235,7 @@ import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry; @@ -266,20 +267,38 @@ public class ClientProxy extends CommonProxy { public void loadConfiguration() { super.loadConfiguration(); - client.enablePlayerSounds = Mekanism.configuration.get("client", "EnablePlayerSounds", true).getBoolean(); - client.enableMachineSounds = Mekanism.configuration.get("client", "EnableMachineSounds", true).getBoolean(); - client.holidays = Mekanism.configuration.get("client", "Holidays", true).getBoolean(); - client.baseSoundVolume = (float) Mekanism.configuration.get("client", "SoundVolume", 1D).getDouble(); - client.machineEffects = Mekanism.configuration.get("client", "MachineEffects", true).getBoolean(); - client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true, - "If true, will reduce lagging between player sounds. Setting to false will reduce GC load").getBoolean(); - client.enableAmbientLighting = Mekanism.configuration.get("client", "EnableAmbientLighting", true).getBoolean(); - client.ambientLightingLevel = Mekanism.configuration.get("client", "AmbientLightingLevel", 15).getInt(); - client.opaqueTransmitters = Mekanism.configuration.get("client", "OpaqueTransmitterRender", false).getBoolean(); - client.allowConfiguratorModeScroll = Mekanism.configuration.get("client", "ConfiguratorModeScroll", true) + client.enablePlayerSounds = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "EnablePlayerSounds", true, + "Play sounds for Jetpack/Gas Mask/Flamethrower (all players).").getBoolean(); + client.enableMachineSounds = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "EnableMachineSounds", true, + "If enabled machines play their sounds while running.").getBoolean(); + client.holidays = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "Holidays", true, "Christmas/New Years greetings in chat.") + .getBoolean(); + client.baseSoundVolume = (float) Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "SoundVolume", 1D, + "Adjust Mekanica sounds' base volume. < 1 is softer, higher is louder.").getDouble(); + client.machineEffects = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "MachineEffects", true, "Show particles when machines active.") + .getBoolean(); + client.enableAmbientLighting = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "EnableAmbientLighting", true, + "Should active machines produce block light.").getBoolean(); + client.ambientLightingLevel = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "AmbientLightingLevel", 15, + "How much light to produce if ambient lighting is enabled.", 1, 15).getInt(); + client.opaqueTransmitters = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "OpaqueTransmitterRender", false, + "If true, don't render Cables/Pipes/Tubes as transparent and don't render their contents.") + .getBoolean(); + client.allowConfiguratorModeScroll = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "ConfiguratorModeScroll", true, + "Allow sneak+scroll to change Configurator modes.").getBoolean(); + client.enableMultiblockFormationParticles = Mekanism.configuration + .get(Configuration.CATEGORY_CLIENT, "MultiblockFormParticles", true, + "Set to false to prevent particle spam when loading multiblocks (notification message will still display).") .getBoolean(); - client.enableMultiblockFormationParticles = Mekanism.configuration.get("client", "MultiblockFormParticles", true, - "Set to false to prevent particle spam when loading multiblocks").getBoolean(); if (Mekanism.configuration.hasChanged()) { Mekanism.configuration.save(); @@ -981,16 +1000,20 @@ public class ClientProxy extends CommonProxy { @Override public void doGenericSparkle(TileEntity tileEntity, INodeChecker checker) { - Minecraft.getMinecraft().player.sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), true); - if(client.enableMultiblockFormationParticles) { + Minecraft.getMinecraft().player + .sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), + true); + if (client.enableMultiblockFormationParticles) { new SparkleAnimation(tileEntity, checker).run(); } } @Override public void doMultiblockSparkle(final TileEntityMultiblock tileEntity) { - Minecraft.getMinecraft().player.sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), true); - if(client.enableMultiblockFormationParticles) { + Minecraft.getMinecraft().player + .sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), + true); + if (client.enableMultiblockFormationParticles) { new SparkleAnimation(tileEntity, tile -> MultiblockManager.areEqual(tile, tileEntity)).run(); } } diff --git a/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java b/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java index 1e09a8d46..ee4ef0810 100644 --- a/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java +++ b/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java @@ -8,11 +8,12 @@ import java.util.Map; import java.util.Set; import mekanism.api.Coord4D; import mekanism.api.EnumColor; +import mekanism.api.TileNetworkList; import mekanism.client.render.MekanismRenderer; import mekanism.client.sound.SoundHandler; import mekanism.common.Mekanism; import mekanism.common.OreDictCache; -import mekanism.api.TileNetworkList; +import mekanism.common.config.MekanismConfig.general; import mekanism.common.content.miner.MItemStackFilter; import mekanism.common.content.miner.MMaterialFilter; import mekanism.common.content.miner.MModIDFilter; @@ -339,7 +340,7 @@ public class GuiDigitalMinerConfig extends GuiMekanismTile public void renderForeground(int xAxis, int yAxis) { mc.renderEngine.bindTexture(RESOURCE); if (inBounds(xAxis, yAxis)) { - displayTooltip(LangUtils.localize("gui.visuals") + ": " + LangUtils.transOnOff(tileEntity.clientRendering), - xAxis, yAxis); + if (tileEntity.radius <= 64) { + displayTooltip( + LangUtils.localize("gui.visuals") + ": " + LangUtils.transOnOff(tileEntity.clientRendering), + xAxis, yAxis); + } else { + displayTooltips(Arrays.asList( + LangUtils.localize("gui.visuals") + ": " + LangUtils.transOnOff(tileEntity.clientRendering), + TextFormatting.RED.toString() + LangUtils.localize("mekanism.gui.visuals.toobig") + ), xAxis, yAxis); + } } mc.renderEngine.bindTexture(defaultLocation); } diff --git a/src/main/java/mekanism/client/render/MinerVisualRenderer.java b/src/main/java/mekanism/client/render/MinerVisualRenderer.java index c16d55569..57809f8f2 100644 --- a/src/main/java/mekanism/client/render/MinerVisualRenderer.java +++ b/src/main/java/mekanism/client/render/MinerVisualRenderer.java @@ -46,12 +46,14 @@ public final class MinerVisualRenderer { List models = new ArrayList<>(); - for (int x = -data.radius; x <= data.radius; x++) { - for (int y = data.minY - data.yCoord; y <= data.maxY - data.yCoord; y++) { - for (int z = -data.radius; z <= data.radius; z++) { - if (x == -data.radius || x == data.radius || y == data.minY - data.yCoord - || y == data.maxY - data.yCoord || z == -data.radius || z == data.radius) { - models.add(createModel(new Coord4D(x, y, z, mc.world.provider.getDimension()))); + if (data.radius <= 64) { + for (int x = -data.radius; x <= data.radius; x++) { + for (int y = data.minY - data.yCoord; y <= data.maxY - data.yCoord; y++) { + for (int z = -data.radius; z <= data.radius; z++) { + if (x == -data.radius || x == data.radius || y == data.minY - data.yCoord + || y == data.maxY - data.yCoord || z == -data.radius || z == data.radius) { + models.add(createModel(new Coord4D(x, y, z, mc.world.provider.getDimension()))); + } } } } diff --git a/src/main/java/mekanism/client/render/obj/TransmitterModel.java b/src/main/java/mekanism/client/render/obj/TransmitterModel.java index 4a4402c79..9dff24fcf 100644 --- a/src/main/java/mekanism/client/render/obj/TransmitterModel.java +++ b/src/main/java/mekanism/client/render/obj/TransmitterModel.java @@ -238,7 +238,7 @@ public class TransmitterModel extends OBJBakedModelBase { connection.connectionTypes); if (type == ConnectionType.NONE) { - if (client.oldTransmitterRender || connection.renderCenter) { + if (connection.renderCenter) { return (byte) 0; } else if (connection.connectionByte == 3 && side != EnumFacing.DOWN && side != EnumFacing.UP) { return (byte) 1; diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index 50d0a18c0..fa3d392ec 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -162,119 +162,193 @@ public class CommonProxy implements IGuiProvider { * Set and load the mod's common configuration properties. */ public void loadConfiguration() { - general.updateNotifications = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "UpdateNotifications", true).getBoolean(); general.controlCircuitOreDict = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true).getBoolean(); - general.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false) + .get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true, + "Enables recipes using Control Circuits to use OreDict'd Control Circuits from other mods.") + .getBoolean(); + general.logPackets = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "LogPackets", false, "Log Mekanica packet names. Debug setting.") .getBoolean(); general.dynamicTankEasterEgg = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false, "Audible sparkles.").getBoolean(); general.cardboardSpawners = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true, + "Allows vanilla spawners to be moved with a Cardboard Box.").getBoolean(); general.enableWorldRegeneration = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EnableWorldRegeneration", false).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "EnableWorldRegeneration", false, + "Allows chunks to retrogen Mekanica ore blocks.").getBoolean(); general.spawnBabySkeletons = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "SpawnBabySkeletons", true).getBoolean(); - general.obsidianTNTDelay = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100) + .get(Configuration.CATEGORY_GENERAL, "SpawnBabySkeletons", true, + "Enable the spawning of baby skeletons. Think baby zombies but skeletons.") + .getBoolean(); + general.obsidianTNTDelay = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100, "Fuse time for Obsidian TNT.") .getInt(); general.obsidianTNTBlastRadius = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt(); - general.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10) + .get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12, + "Radius of the explosion of Obsidian TNT.").getInt(); + general.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10, + "How many ticks must pass until a block's active state can sync with the client.") .getInt(); - general.osmiumPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumPerChunk", 12) + general.osmiumPerChunk = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "OsmiumPerChunk", 12, "Chance that osmium generates in a chunk.", 0, + Integer.MAX_VALUE).getInt(); + general.osmiumMaxVeinSize = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "OsmiumVeinSize", 8, "Max number of blocks in an osmium vein.", 1, + Integer.MAX_VALUE) .getInt(); - general.copperPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperPerChunk", 16) + general.copperPerChunk = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "CopperPerChunk", 16, "Chance that copper generates in a chunk.", 0, + Integer.MAX_VALUE) .getInt(); - general.tinPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TinPerChunk", 14).getInt(); - general.saltPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SaltPerChunk", 2).getInt(); - general.userWorldGenVersion = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "WorldRegenVersion", 0) + general.copperMaxVeinSize = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "CopperVeinSize", 8, "Max number of blocks in a copper vein.", 1, + Integer.MAX_VALUE) .getInt(); - general.FROM_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToEU", 10D).getDouble(); - general.TO_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EUToJoules", .1D).getDouble(); - general.FROM_RF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToRF", 2.5D).getDouble(); - general.TO_RF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "RFToJoules", 0.4D).getDouble(); - general.FROM_TESLA = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToTesla", 2.5D) + general.tinPerChunk = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "TinPerChunk", 14, "Chance that tin generates in a chunk.", 0, + Integer.MAX_VALUE).getInt(); + general.tinMaxVeinSize = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "TinVeinSize", 8, "Max number of blocks in a tin vein.", 1, + Integer.MAX_VALUE).getInt(); + general.saltPerChunk = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "SaltPerChunk", 2, "Chance that salt generates in a chunk.", 0, + Integer.MAX_VALUE).getInt(); + general.saltMaxVeinSize = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "SaltVeinSize", 6, "Max number of blocks in a salt vein.", 1, + Integer.MAX_VALUE).getInt(); + general.userWorldGenVersion = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "WorldRegenVersion", 0, + "Change this value to cause Mekanica to regen its ore in all loaded chunks.") + .getInt(); + general.FROM_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToEU", 10D, + "Conversion multiplier from EU to Joules (EU * JoulesToEU = Joules)").getDouble(); + general.TO_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EUToJoules", .1D, + "Conversion multiplier from Joules to EU (Joules * EUToJoules = EU)").getDouble(); + general.FROM_RF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToRF", 2.5D, + "Conversion multiplier from RF to Joules (RF * JoulesToRF = Joules)").getDouble(); + general.TO_RF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "RFToJoules", 0.4D, + "Conversion multiplier from Joules to RF (Joules * RFToJoules = RF)").getDouble(); + general.FROM_TESLA = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToTesla", 2.5D, + "Conversion multiplier from Tesla to Joules (Tesla * JoulesToTesla = Joules)") .getDouble(); - general.TO_TESLA = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TeslaToJoules", 0.4D) + general.TO_TESLA = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TeslaToJoules", 0.4D, + "Conversion multiplier from Joules to Tesla (Joules * TeslaToJoules = Tesla)") .getDouble(); - general.FROM_FORGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToForge", 2.5D) + general.FROM_FORGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToForge", 2.5D, + "Conversion multiplier from Forge Energy to Joules (FE * JoulesToForge = Joules)") .getDouble(); - general.TO_FORGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ForgeToJoules", 0.4D) + general.TO_FORGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ForgeToJoules", 0.4D, + "Conversion multiplier from Joules to Forge Energy (Joules * ForgeToJoules = FE)") .getDouble(); general.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, - "Determines Electrolytic Separator usage").getDouble(); - general.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40) - .getInt(); + "How much energy is produced per mB of Hydrogen, also affects Electrolytic Separator usage, Ethylene burn rate and Gas generator energy capacity") + .getDouble(); + general.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40, + "Burn time for Ethylene (1mB hydrogen + 2*bioFuel/tick*200ticks/100mB * 20x efficiency bonus).").getInt(); general.ENERGY_PER_REDSTONE = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D, + "How much energy (Joules) a piece of redstone gives in machines.").getDouble(); general.DISASSEMBLER_USAGE = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "DisassemblerEnergyUsage", 10).getInt(); + .get(Configuration.CATEGORY_GENERAL, "DisassemblerEnergyUsage", 10, + "Base Energy (Joules) usage of the Atomic Disassembler.").getInt(); //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(); + .get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, + "Base factor for working out machine performance with upgrades - UpgradeModifier * (UpgradesInstalled/UpgradesPossible).", + 1, Integer.MAX_VALUE).getInt(); general.minerSilkMultiplier = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "MinerSilkMultiplier", 6).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "MinerSilkMultiplier", 6, + "Energy multiplier for using silk touch mode with the Digital Miner.").getDouble(); general.prefilledGasTanks = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "PrefilledGasTanks", true).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "PrefilledGasTanks", true, + "Add filled creative gas tanks to creative/JEI.").getBoolean(); general.armoredJetpackDamageRatio = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "ArmoredJetpackDamageRatio", 0.8).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "ArmoredJetpackDamageRatio", 0.8, + "Damage absorb ratio of the Armored Jetpack.").getDouble(); general.armoredJetpackDamageMax = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "ArmoredJepackDamageMax", 115).getInt(); + .get(Configuration.CATEGORY_GENERAL, "ArmoredJepackDamageMax", 115, + "Max damage the Armored Jetpack can absorb.").getInt(); general.aestheticWorldDamage = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "AestheticWorldDamage", true).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "AestheticWorldDamage", true, + "If enabled, lasers can break blocks and the flamethrower starts fires.").getBoolean(); general.opsBypassRestrictions = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "OpsBypassRestrictions", false).getBoolean(); - general.thermalEvaporationSpeed = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "ThermalEvaporationSpeed", 1.0D).getDouble(); - general.maxJetpackGas = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxJetpackGas", 24000) + .get(Configuration.CATEGORY_GENERAL, "OpsBypassRestrictions", false, + "Ops can bypass the block security restrictions if enabled.").getBoolean(); + general.maxJetpackGas = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "MaxJetpackGas", 24000, "Jetpack Gas Tank capacity in mB.") + .getInt(); + general.maxScubaGas = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "MaxScubaGas", 24000, "Scuba Tank Gas Tank capacity in mB.") .getInt(); - general.maxScubaGas = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxScubaGas", 24000).getInt(); general.maxFlamethrowerGas = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "MaxFlamethrowerGas", 24000).getInt(); - general.maxPumpRange = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxPumpRange", 80).getInt(); - general.pumpWaterSources = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "PumpWaterSources", false) + .get(Configuration.CATEGORY_GENERAL, "MaxFlamethrowerGas", 24000, "Flamethrower Gas Tank capacity in mB.") + .getInt(); + general.maxPumpRange = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxPumpRange", 80, + "Maximum block distance to pull fluid from for the Electric Pump.").getInt(); + general.pumpWaterSources = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "PumpWaterSources", false, + "If enabled makes Water and Heavy Water blocks be removed from the world on pump.") .getBoolean(); general.maxPlenisherNodes = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "MaxPlenisherNodes", 4000).getInt(); + .get(Configuration.CATEGORY_GENERAL, "MaxPlenisherNodes", 4000, + "Fluidic Plenisher stops after this many blocks.").getInt(); general.evaporationHeatDissipation = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EvaporationHeatDissipation", 0.02D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "EvaporationHeatDissipation", 0.02D, + "Thermal Evaporation Tower heat loss per tick.").getDouble(); general.evaporationTempMultiplier = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EvaporationTempMultiplier", 0.1D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "EvaporationTempMultiplier", 0.1D, + "Temperature to amount produced ratio for Thermal Evaporation Tower.").getDouble(); general.evaporationSolarMultiplier = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EvaporationSolarMultiplier", 0.2D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "EvaporationSolarMultiplier", 0.2D, + "Heat to absorb per Solar Panel array of Thermal Evaporation Tower.").getDouble(); general.evaporationMaxTemp = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EvaporationMaxTemp", 3000D).getDouble(); - general.energyPerHeat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerHeat", 1000D) + .get(Configuration.CATEGORY_GENERAL, "EvaporationMaxTemp", 3000D, + "Max Temperature of the Thermal Evaporation Tower.").getDouble(); + general.energyPerHeat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerHeat", 1000D, + "Joules required by the Resistive Heater to produce one unit of heat. Also affects Thermoelectric Boiler's Water->Steam rate.") .getDouble(); general.maxEnergyPerSteam = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "MaxEnergyPerSteam", 100D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "MaxEnergyPerSteam", 100D, + "Maximum Joules per mB of Steam. Also affects Thermoelectric Boiler.").getDouble(); general.superheatingHeatTransfer = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "SuperheatingHeatTransfer", 10000D).getDouble(); - general.heatPerFuelTick = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HeatPerFuelTick", 4D) + .get(Configuration.CATEGORY_GENERAL, "SuperheatingHeatTransfer", 10000D, + "Amount of heat each Boiler heating element produces.").getDouble(); + general.heatPerFuelTick = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HeatPerFuelTick", 4D, + "Amount of heat produced per fuel tick of a fuel's burn time in the Fuelwood Heater.") .getDouble(); general.allowTransmitterAlloyUpgrade = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "AllowTransmitterAlloyUpgrade", true).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "AllowTransmitterAlloyUpgrade", true, + "Allow right clicking on Cables/Pipes/Tubes with alloys to upgrade the tier.").getBoolean(); general.allowChunkloading = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "AllowChunkloading", true).getBoolean(); - general.allowProtection = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowProtection", true) + .get(Configuration.CATEGORY_GENERAL, "AllowChunkloading", true, + "Disable to make the anchor upgrade not do anything.").getBoolean(); + general.allowProtection = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowProtection", true, + "Enable the security system for players to prevent others from accessing their machines. Does NOT affect Frequencies.") .getBoolean(); general.portableTeleporterDelay = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "PortableTeleporterDelay", 0).getInt(); + .get(Configuration.CATEGORY_GENERAL, "PortableTeleporterDelay", 0, + "Delay in ticks before a player is teleported after clicking the Teleport button in the portable teleporter.") + .getInt(); general.quantumEntangloporterEnergyTransfer = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "QuantumEntangloporterEnergyTransfer", 16000000D).getDouble(); + .get(Configuration.CATEGORY_GENERAL, "QuantumEntangloporterEnergyTransfer", 16000000D, + "Maximum buffer of an Entangoloporter frequency.").getDouble(); general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false, - "Disables IC2 power integration. Requires world restart (server-side option in SMP)").getBoolean(); - general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false) + "Disables IC2 power integration. Requires world restart (server-side option in SMP).").getBoolean(); + general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false, + "Disables Thermal Expansion RedstoneFlux power integration. Requires world restart (server-side option in SMP).") .getBoolean(); general.blacklistTesla = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "BlacklistTeslaPower", false).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "BlacklistTeslaPower", false, + "Disables Tesla power integration. Requires world restart (server-side option in SMP).") + .getBoolean(); general.blacklistForge = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "BlacklistForgePower", false).getBoolean(); + .get(Configuration.CATEGORY_GENERAL, "BlacklistForgePower", false, + "Disables Forge Energy (FE,IF,uF,CF) power integration. Requires world restart (server-side option in SMP).") + .getBoolean(); String s = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "EnergyType", "RF", null, new String[]{"J", "RF", "EU", "T"}) + .get(Configuration.CATEGORY_GENERAL, "EnergyType", "RF", "Displayed energy type in Mekanica GUIs.", + new String[]{"J", "RF", "EU", "T"}) .getString().trim().toLowerCase(); switch (s) { @@ -293,7 +367,8 @@ public class CommonProxy implements IGuiProvider { } s = Mekanism.configuration - .get(Configuration.CATEGORY_GENERAL, "Temperature Units", "K", null, new String[]{"K", "C", "R", "F"}) + .get(Configuration.CATEGORY_GENERAL, "Temperature Units", "K", + "Displayed temperature unit in Mekanica GUIs.", new String[]{"K", "C", "R", "F"}) .getString(); if (s != null) { @@ -312,53 +387,100 @@ public class CommonProxy implements IGuiProvider { } } - general.laserRange = Mekanism.configuration.get("general", "LaserRange", 64).getInt(); - general.laserEnergyNeededPerHardness = Mekanism.configuration.get("general", "LaserDiggingEnergy", 100000) + general.laserRange = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "LaserRange", 64, "How far (in blocks) a laser can travel.") .getInt(); - general.destroyDisabledBlocks = Mekanism.configuration.get("general", "DestroyDisabledBlocks", true) + general.laserEnergyNeededPerHardness = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "LaserDiggingEnergy", 100000, + "Energy needed to destroy or attract blocks with a Laser (per block hardness level).") + .getInt(); + general.destroyDisabledBlocks = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "DestroyDisabledBlocks", true, + "If machine is disabled in config, do we set its block to air if it is found in world?") .getBoolean(); + general.digitalMinerMaxRadius = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "DigitalMinerMaxRadius", 32, + "Maximum radius in blocks that the Digital Miner can reach. " + + "(Increasing this may have negative effects on stability and/or performance. " + + "We strongly recommend you leave it at the default value.)", + 1, Integer.MAX_VALUE).getInt(); for (MachineType type : BlockStateMachine.MachineType.getValidMachines()) { general.machinesManager.setEntry(type.blockName, - Mekanism.configuration.get("machines", type.blockName + "Enabled", true).getBoolean()); + Mekanism.configuration.get("machines", type.blockName + "Enabled", true, + "Allow " + type.blockName + " to be used/crafted.").getBoolean()); } - usage.enrichmentChamberUsage = Mekanism.configuration.get("usage", "EnrichmentChamberUsage", 50D).getDouble(); - usage.osmiumCompressorUsage = Mekanism.configuration.get("usage", "OsmiumCompressorUsage", 100D).getDouble(); - usage.combinerUsage = Mekanism.configuration.get("usage", "CombinerUsage", 50D).getDouble(); - usage.crusherUsage = Mekanism.configuration.get("usage", "CrusherUsage", 50D).getDouble(); - usage.metallurgicInfuserUsage = Mekanism.configuration.get("usage", "MetallurgicInfuserUsage", 50D).getDouble(); - usage.purificationChamberUsage = Mekanism.configuration.get("usage", "PurificationChamberUsage", 200D) + general.sawdustChancePlank = Mekanism.configuration + .get(Configuration.CATEGORY_GENERAL, "SawdustChancePlank", 0.25D, + "Chance of producing sawdust per operation in the precision sawmill when turning planks into sticks.") .getDouble(); - usage.energizedSmelterUsage = Mekanism.configuration.get("usage", "EnergizedSmelterUsage", 50D).getDouble(); - usage.digitalMinerUsage = Mekanism.configuration.get("usage", "DigitalMinerUsage", 100D).getDouble(); - usage.electricPumpUsage = Mekanism.configuration.get("usage", "ElectricPumpUsage", 100D).getDouble(); - usage.rotaryCondensentratorUsage = Mekanism.configuration.get("usage", "RotaryCondensentratorUsage", 50D) + general.sawdustChanceLog = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SawdustChanceLog", 1D, + "Chance of producing sawdust per operation in the precision sawmill when turning logs into planks.") .getDouble(); - usage.oxidationChamberUsage = Mekanism.configuration.get("usage", "OxidationChamberUsage", 200D).getDouble(); - usage.chemicalInfuserUsage = Mekanism.configuration.get("usage", "ChemicalInfuserUsage", 200D).getDouble(); - usage.chemicalInjectionChamberUsage = Mekanism.configuration.get("usage", "ChemicalInjectionChamberUsage", 400D) + + usage.enrichmentChamberUsage = Mekanism.configuration + .get("usage", "EnrichmentChamberUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.osmiumCompressorUsage = Mekanism.configuration + .get("usage", "OsmiumCompressorUsage", 100D, "Energy per operation tick (Joules).").getDouble(); + usage.combinerUsage = Mekanism.configuration + .get("usage", "CombinerUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.crusherUsage = Mekanism.configuration + .get("usage", "CrusherUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.metallurgicInfuserUsage = Mekanism.configuration + .get("usage", "MetallurgicInfuserUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.purificationChamberUsage = Mekanism.configuration + .get("usage", "PurificationChamberUsage", 200D, "Energy per operation tick (Joules).") .getDouble(); - usage.precisionSawmillUsage = Mekanism.configuration.get("usage", "PrecisionSawmillUsage", 50D).getDouble(); + usage.energizedSmelterUsage = Mekanism.configuration + .get("usage", "EnergizedSmelterUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.digitalMinerUsage = Mekanism.configuration + .get("usage", "DigitalMinerUsage", 100D, "Energy per operation tick (Joules).").getDouble(); + usage.electricPumpUsage = Mekanism.configuration + .get("usage", "ElectricPumpUsage", 100D, "Energy per operation tick (Joules).").getDouble(); + usage.rotaryCondensentratorUsage = Mekanism.configuration + .get("usage", "RotaryCondensentratorUsage", 50D, "Energy per operation tick (Joules).") + .getDouble(); + usage.oxidationChamberUsage = Mekanism.configuration + .get("usage", "OxidationChamberUsage", 200D, "Energy per operation tick (Joules).").getDouble(); + usage.chemicalInfuserUsage = Mekanism.configuration + .get("usage", "ChemicalInfuserUsage", 200D, "Energy per operation tick (Joules).").getDouble(); + usage.chemicalInjectionChamberUsage = Mekanism.configuration + .get("usage", "ChemicalInjectionChamberUsage", 400D, "Energy per operation tick (Joules).") + .getDouble(); + usage.precisionSawmillUsage = Mekanism.configuration + .get("usage", "PrecisionSawmillUsage", 50D, "Energy per operation tick (Joules).").getDouble(); usage.chemicalDissolutionChamberUsage = Mekanism.configuration .get("usage", "ChemicalDissolutionChamberUsage", 400D).getDouble(); - usage.chemicalWasherUsage = Mekanism.configuration.get("usage", "ChemicalWasherUsage", 200D).getDouble(); - usage.chemicalCrystallizerUsage = Mekanism.configuration.get("usage", "ChemicalCrystallizerUsage", 400D) + usage.chemicalWasherUsage = Mekanism.configuration + .get("usage", "ChemicalWasherUsage", 200D, "Energy per operation tick (Joules).").getDouble(); + usage.chemicalCrystallizerUsage = Mekanism.configuration + .get("usage", "ChemicalCrystallizerUsage", 400D, "Energy per operation tick (Joules).") .getDouble(); - usage.seismicVibratorUsage = Mekanism.configuration.get("usage", "SeismicVibratorUsage", 50D).getDouble(); - usage.pressurizedReactionBaseUsage = Mekanism.configuration.get("usage", "PressurizedReactionBaseUsage", 5D) + usage.seismicVibratorUsage = Mekanism.configuration + .get("usage", "SeismicVibratorUsage", 50D, "Energy per operation tick (Joules).").getDouble(); + usage.pressurizedReactionBaseUsage = Mekanism.configuration + .get("usage", "PressurizedReactionBaseUsage", 5D, "Energy per operation tick (Joules).") .getDouble(); - usage.fluidicPlenisherUsage = Mekanism.configuration.get("usage", "FluidicPlenisherUsage", 100D).getDouble(); - usage.laserUsage = Mekanism.configuration.get("usage", "LaserUsage", 5000D).getDouble(); - usage.gasCentrifugeUsage = Mekanism.configuration.get("usage", "GasCentrifugeUsage", 100D).getDouble(); - usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D) + usage.fluidicPlenisherUsage = Mekanism.configuration + .get("usage", "FluidicPlenisherUsage", 100D, "Energy per operation tick (Joules).").getDouble(); + usage.laserUsage = Mekanism.configuration + .get("usage", "LaserUsage", 5000D, "Energy per operation tick (Joules).").getDouble(); + usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D, + "Energy needed for one [recipe unit] of heavy water production (Joules).") .getDouble(); - usage.formulaicAssemblicatorUsage = Mekanism.configuration.get("usage", "FormulaicAssemblicatorUsage", 100D) + usage.formulaicAssemblicatorUsage = Mekanism.configuration + .get("usage", "FormulaicAssemblicatorUsage", 100D, "Energy per operation tick (Joules).") .getDouble(); - usage.teleporterBaseUsage = Mekanism.configuration.get("usage", "TeleporterBaseUsage", 1000).getInt(); - usage.teleporterDistanceUsage = Mekanism.configuration.get("usage", "TeleporterDistanceUsage", 10).getInt(); - usage.teleporterDimensionPenalty = Mekanism.configuration.get("usage", "TeleporterDimensionPenalty", 10000) + usage.teleporterBaseUsage = Mekanism.configuration + .get("usage", "TeleporterBaseUsage", 1000, "Base Joules cost for a teleportation.") .getInt(); + usage.teleporterDistanceUsage = Mekanism.configuration.get("usage", "TeleporterDistanceUsage", 10, + "Joules per unit of distance travelled during teleportation - sqrt(xDiff^2 + yDiff^2 + zDiff^2).") + .getInt(); + usage.teleporterDimensionPenalty = Mekanism.configuration + .get("usage", "TeleporterDimensionPenalty", 10000, + "Flat additional cost for interdimensional teleportation.").getInt(); Tier.loadConfig(); diff --git a/src/main/java/mekanism/common/Tier.java b/src/main/java/mekanism/common/Tier.java index 00d6df345..0e6540ca4 100644 --- a/src/main/java/mekanism/common/Tier.java +++ b/src/main/java/mekanism/common/Tier.java @@ -123,10 +123,11 @@ public final class Tier { @Override public void loadConfig() { if (this != CREATIVE) { - maxEnergy = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "EnergyCubeMaxEnergy", baseMaxEnergy).getDouble(); - output = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "EnergyCubeOutput", baseOutput).getDouble(); + String name = getBaseTier().getSimpleName(); + maxEnergy = Mekanism.configuration.get("tier", name + "EnergyCubeMaxEnergy", baseMaxEnergy, + "Maximum number of Joules a " + name + " energy cube can store.").getDouble(); + output = Mekanism.configuration.get("tier", name + "EnergyCubeOutput", baseOutput, + "Output rate in Joules of a " + name + " energy cube.").getDouble(); } } @@ -177,8 +178,9 @@ public final class Tier { @Override public void loadConfig() { - maxEnergy = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "InductionCellMaxEnergy", baseMaxEnergy).getDouble(); + String name = getBaseTier().getSimpleName(); + maxEnergy = Mekanism.configuration.get("tier", name + "InductionCellMaxEnergy", baseMaxEnergy, + "Maximum number of Joules a " + name + " induction cell can store.").getDouble(); } @Override @@ -212,8 +214,9 @@ public final class Tier { @Override public void loadConfig() { - output = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "InductionProviderOutput", baseOutput).getDouble(); + String name = getBaseTier().getSimpleName(); + output = Mekanism.configuration.get("tier", name + "InductionProviderOutput", baseOutput, + "Maximum number of Joules a " + name + " induction provider can output or accept.").getDouble(); } @Override @@ -291,8 +294,9 @@ public final class Tier { @Override public void loadConfig() { - cableCapacity = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "CableCapacity", baseCapacity).getInt(); + String name = getBaseTier().getSimpleName(); + cableCapacity = Mekanism.configuration.get("tier", name + "CableCapacity", baseCapacity, + "Internal buffer in Joules of each " + name + " universal cable.").getInt(); } @Override @@ -339,10 +343,11 @@ public final class Tier { @Override public void loadConfig() { - pipeCapacity = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "PipeCapacity", baseCapacity).getInt(); - pipePullAmount = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "PipePullAmount", basePull).getInt(); + String name = getBaseTier().getSimpleName(); + pipeCapacity = Mekanism.configuration.get("tier", name + "PipeCapacity", baseCapacity, + "Capacity of " + name + " mechanical pipe in mB.").getInt(); + pipePullAmount = Mekanism.configuration.get("tier", name + "PipePullAmount", basePull, + "Pump rate of " + name + " mechanical pipe in mB/t.").getInt(); } @Override @@ -391,10 +396,11 @@ public final class Tier { @Override public void loadConfig() { - tubeCapacity = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "TubeCapacity", baseCapacity).getInt(); - tubePullAmount = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "TubePullAmount", basePull).getInt(); + String name = getBaseTier().getSimpleName(); + tubeCapacity = Mekanism.configuration.get("tier", name + "TubeCapacity", baseCapacity, + "Capacity of " + name + " pressurized tube in mB.").getInt(); + tubePullAmount = Mekanism.configuration.get("tier", name + "TubePullAmount", basePull, + "Pump rate of " + name + " pressurized tube in mB/t.").getInt(); } @Override @@ -443,10 +449,11 @@ public final class Tier { @Override public void loadConfig() { - pullAmount = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "TransporterPullAmount", basePull).getInt(); - speed = Mekanism.configuration.get("tier", getBaseTier().getSimpleName() + "TransporterSpeed", baseSpeed) - .getInt(); + String name = getBaseTier().getSimpleName(); + pullAmount = Mekanism.configuration.get("tier", name + "TransporterPullAmount", basePull, + "Item throughput rate of " + name + " logistical transporter in items/s.").getInt(); + speed = Mekanism.configuration.get("tier", name + "TransporterSpeed", baseSpeed, + "Five times travel speed of " + name + " logistical transporter.").getInt(); } @Override @@ -501,14 +508,14 @@ public final class Tier { @Override public void loadConfig() { - inverseConduction = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "ConductorInverseConduction", baseConduction) - .getDouble(); - inverseHeatCapacity = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "ConductorHeatCapacity", baseHeatCapacity).getDouble(); + String name = getBaseTier().getSimpleName(); + inverseConduction = Mekanism.configuration.get("tier", name + "ConductorInverseConduction", baseConduction, + "Conduction value of " + name + " thermodynamic conductor.").getDouble(); + inverseHeatCapacity = Mekanism.configuration.get("tier", name + "ConductorHeatCapacity", baseHeatCapacity, + "Heat capacity of " + name + " thermodynamic conductor.").getDouble(); inverseConductionInsulation = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "ConductorConductionInsulation", - baseConductionInsulation).getDouble(); + .get("tier", name + "ConductorConductionInsulation", baseConductionInsulation, + "Insulation value of " + name + " thermodynamic conductor.").getDouble(); } @Override @@ -550,10 +557,11 @@ public final class Tier { @Override public void loadConfig() { - storage = Mekanism.configuration - .get("tier", getBaseTier().getSimpleName() + "FluidTankStorage", baseStorage).getInt(); - output = Mekanism.configuration.get("tier", getBaseTier().getSimpleName() + "FluidTankOutput", baseOutput) - .getInt(); + String name = getBaseTier().getSimpleName(); + storage = Mekanism.configuration.get("tier", name + "FluidTankStorage", baseStorage, + "Storage size of " + name + " gas tank in mB.").getInt(); + output = Mekanism.configuration.get("tier", name + "FluidTankOutput", baseOutput, + "Output rate of " + name + " gas tank in mB.").getInt(); } @Override @@ -593,10 +601,11 @@ public final class Tier { @Override public void loadConfig() { - storage = Mekanism.configuration.get("tier", getBaseTier().getSimpleName() + "GasTankStorage", baseStorage) - .getInt(); - output = Mekanism.configuration.get("tier", getBaseTier().getSimpleName() + "GasTankOutput", baseOutput) - .getInt(); + String name = getBaseTier().getSimpleName(); + storage = Mekanism.configuration.get("tier", name + "GasTankStorage", baseStorage, + "Storage size of " + name + " gas tank in mB.").getInt(); + output = Mekanism.configuration.get("tier", name + "GasTankOutput", baseOutput, + "Output rate of " + name + " gas tank in mB.").getInt(); } @Override @@ -638,8 +647,9 @@ public final class Tier { @Override public void loadConfig() { - storage = Mekanism.configuration.get("tier", getBaseTier().getSimpleName() + "BinStorage", baseStorage) - .getInt(); + String name = getBaseTier().getSimpleName(); + storage = Mekanism.configuration.get("tier", name + "BinStorage", baseStorage, + "The number of items a " + name + " bin can store.").getInt(); } @Override diff --git a/src/main/java/mekanism/common/config/MekanismConfig.java b/src/main/java/mekanism/common/config/MekanismConfig.java index c00a32674..ca12b6a7d 100644 --- a/src/main/java/mekanism/common/config/MekanismConfig.java +++ b/src/main/java/mekanism/common/config/MekanismConfig.java @@ -10,7 +10,6 @@ public class MekanismConfig { public static TypeConfigManager machinesManager = new TypeConfigManager(); - public static boolean updateNotifications = true; public static boolean controlCircuitOreDict = true; public static boolean logPackets = false; public static boolean dynamicTankEasterEgg = false; @@ -19,9 +18,13 @@ public class MekanismConfig { public static boolean spawnBabySkeletons = true; public static int obsidianTNTBlastRadius = 12; public static int osmiumPerChunk = 12; + public static int osmiumMaxVeinSize = 8; public static int copperPerChunk = 16; + public static int copperMaxVeinSize = 8; public static int tinPerChunk = 14; + public static int tinMaxVeinSize = 8; public static int saltPerChunk = 2; + public static int saltMaxVeinSize = 6; public static int obsidianTNTDelay = 100; public static int UPDATE_DELAY = 10; public static int maxUpgradeMultiplier = 10; @@ -31,35 +34,35 @@ public class MekanismConfig { public static double DISASSEMBLER_USAGE = 10; public static EnergyType energyUnit = EnergyType.J; public static TempType tempUnit = TempType.K; - public static double TO_IC2; - public static double TO_RF; - public static double TO_TESLA; - public static double TO_FORGE; - public static double FROM_H2; - public static double FROM_IC2; - public static double FROM_RF; - public static double FROM_TESLA; - public static double FROM_FORGE; - public static int laserRange; - public static double laserEnergyNeededPerHardness; + public static double TO_IC2 = 0.1; + public static double TO_RF = 0.4; + public static double TO_TESLA = 0.4; + public static double TO_FORGE = 0.4; + public static double FROM_H2 = 200; + public static double FROM_IC2 = 10; + public static double FROM_RF = 2.5; + public static double FROM_TESLA = 2.5; + public static double FROM_FORGE = 2.5; + public static int laserRange = 64; + public static double laserEnergyNeededPerHardness = 100000; public static double minerSilkMultiplier = 6; - public static boolean blacklistIC2; - public static boolean blacklistRF; - public static boolean blacklistTesla; - public static boolean blacklistForge; - public static boolean destroyDisabledBlocks; - public static boolean prefilledGasTanks; - public static double armoredJetpackDamageRatio; - public static int armoredJetpackDamageMax; - public static boolean aestheticWorldDamage; - public static boolean opsBypassRestrictions; - public static double thermalEvaporationSpeed; - public static int maxJetpackGas; - public static int maxScubaGas; - public static int maxFlamethrowerGas; - public static int maxPumpRange; - public static boolean pumpWaterSources; - public static int maxPlenisherNodes; + public static boolean blacklistIC2 = false; + public static boolean blacklistRF = false; + public static boolean blacklistTesla = false; + public static boolean blacklistForge = false; + public static boolean destroyDisabledBlocks = true; + public static int digitalMinerMaxRadius = 32; + public static boolean prefilledGasTanks = true; + public static double armoredJetpackDamageRatio = 0.8; + public static int armoredJetpackDamageMax = 115; + public static boolean aestheticWorldDamage = true; + public static boolean opsBypassRestrictions = false; + public static int maxJetpackGas = 24000; + public static int maxScubaGas = 24000; + public static int maxFlamethrowerGas = 24000; + public static int maxPumpRange = 80; + public static boolean pumpWaterSources = false; + public static int maxPlenisherNodes = 4000; public static double evaporationHeatDissipation = 0.02; public static double evaporationTempMultiplier = 0.1; public static double evaporationSolarMultiplier = 0.2; @@ -68,89 +71,88 @@ public class MekanismConfig { public static double maxEnergyPerSteam = 100; public static double superheatingHeatTransfer = 10000; public static double heatPerFuelTick = 4; - public static boolean allowTransmitterAlloyUpgrade; - public static boolean allowChunkloading; + public static boolean allowTransmitterAlloyUpgrade = true; + public static boolean allowChunkloading = true; public static boolean allowProtection = true; - public static int portableTeleporterDelay; - public static double quantumEntangloporterEnergyTransfer; + public static int portableTeleporterDelay = 0; + public static double quantumEntangloporterEnergyTransfer = 16000000; + public static double sawdustChancePlank = 0.25; + public static double sawdustChanceLog = 1; } public static class client { public static boolean enablePlayerSounds = true; public static boolean enableMachineSounds = true; - public static boolean holidays = true; + public static boolean holidays = true;//Was going to remove? public static float baseSoundVolume = 1F; public static boolean machineEffects = true; - public static boolean oldTransmitterRender = false; - public static boolean replaceSoundsWhenResuming = true; public static boolean enableAmbientLighting; - public static int ambientLightingLevel; + public static int ambientLightingLevel = 15; public static boolean opaqueTransmitters = false; - public static boolean allowConfiguratorModeScroll; + public static boolean allowConfiguratorModeScroll = true; public static boolean enableMultiblockFormationParticles = true; } public static class usage { - public static double enrichmentChamberUsage; - public static double osmiumCompressorUsage; - public static double combinerUsage; - public static double crusherUsage; - public static double metallurgicInfuserUsage; - public static double purificationChamberUsage; - public static double energizedSmelterUsage; - public static double digitalMinerUsage; - public static double electricPumpUsage; - public static double rotaryCondensentratorUsage; - public static double oxidationChamberUsage; - public static double chemicalInfuserUsage; - public static double chemicalInjectionChamberUsage; - public static double precisionSawmillUsage; - public static double chemicalDissolutionChamberUsage; - public static double chemicalWasherUsage; - public static double chemicalCrystallizerUsage; - public static double seismicVibratorUsage; - public static double pressurizedReactionBaseUsage; - public static double fluidicPlenisherUsage; - public static double laserUsage; - public static double gasCentrifugeUsage; - public static double heavyWaterElectrolysisUsage; - public static double formulaicAssemblicatorUsage; - public static int teleporterBaseUsage; - public static int teleporterDistanceUsage; - public static int teleporterDimensionPenalty; + public static double enrichmentChamberUsage = 50; + public static double osmiumCompressorUsage = 100; + public static double combinerUsage = 50; + public static double crusherUsage = 50; + public static double metallurgicInfuserUsage = 50; + public static double purificationChamberUsage = 200; + public static double energizedSmelterUsage = 50; + public static double digitalMinerUsage = 100; + public static double electricPumpUsage = 100; + public static double rotaryCondensentratorUsage = 50; + public static double oxidationChamberUsage = 200; + public static double chemicalInfuserUsage = 200; + public static double chemicalInjectionChamberUsage = 400; + public static double precisionSawmillUsage = 50; + public static double chemicalDissolutionChamberUsage = 400; + public static double chemicalWasherUsage = 200; + public static double chemicalCrystallizerUsage = 400; + public static double seismicVibratorUsage = 50; + public static double pressurizedReactionBaseUsage = 5; + public static double fluidicPlenisherUsage = 100; + public static double laserUsage = 5000; + public static double heavyWaterElectrolysisUsage = 800; + public static double formulaicAssemblicatorUsage = 100; + public static int teleporterBaseUsage = 1000; + public static int teleporterDistanceUsage = 10; + public static int teleporterDimensionPenalty = 10000; } public static class generators { public static TypeConfigManager generatorsManager = new TypeConfigManager(); - public static double advancedSolarGeneration; - public static double bioGeneration; - public static double heatGeneration; - public static double heatGenerationLava; - public static double heatGenerationNether; - public static double solarGeneration; + public static double advancedSolarGeneration = 300; + public static double bioGeneration = 350; + public static double heatGeneration = 150; + public static double heatGenerationLava = 5; + public static double heatGenerationNether = 100; + public static double solarGeneration = 50; - public static double windGenerationMin; - public static double windGenerationMax; + public static double windGenerationMin = 60; + public static double windGenerationMax = 480; - public static int windGenerationMinY; - public static int windGenerationMaxY; + public static int windGenerationMinY = 24; + public static int windGenerationMaxY = 255; public static Set windGenerationDimBlacklist; - public static int turbineBladesPerCoil; - public static double turbineVentGasFlow; - public static double turbineDisperserGasFlow; - public static int condenserRate; + public static int turbineBladesPerCoil = 4; + public static double turbineVentGasFlow = 16000; + public static double turbineDisperserGasFlow = 640; + public static int condenserRate = 32000; - public static double energyPerFusionFuel; + public static double energyPerFusionFuel = 5E6; } public static class tools { - public static double armorSpawnRate; + public static double armorSpawnRate = 0.03; } -} +} \ No newline at end of file diff --git a/src/main/java/mekanism/common/integration/OreDictManager.java b/src/main/java/mekanism/common/integration/OreDictManager.java index 2bd7f9e57..75a690435 100644 --- a/src/main/java/mekanism/common/integration/OreDictManager.java +++ b/src/main/java/mekanism/common/integration/OreDictManager.java @@ -13,6 +13,7 @@ import mekanism.common.Mekanism; import mekanism.common.MekanismFluids; import mekanism.common.MekanismItems; import mekanism.common.Resource; +import mekanism.common.config.MekanismConfig.general; import mekanism.common.recipe.RecipeHandler; import mekanism.common.recipe.RecipeHandler.Recipe; import mekanism.common.util.MekanismUtils; @@ -40,7 +41,14 @@ public final class OreDictManager { ItemStack plank = StackUtils.size(ore, 1); if (!Recipe.PRECISION_SAWMILL.containsRecipe(plank)) { RecipeHandler.addPrecisionSawmillRecipe(plank, new ItemStack(Items.STICK, 6), - new ItemStack(MekanismItems.Sawdust), 0.25); + new ItemStack(MekanismItems.Sawdust), general.sawdustChancePlank); + } + } + + for (ItemStack ore : OreDictionary.getOres("stickWood")) { + ItemStack stick = StackUtils.size(ore, 1); + if (!Recipe.PRECISION_SAWMILL.containsRecipe(stick)) { + RecipeHandler.addPrecisionSawmillRecipe(stick, new ItemStack(MekanismItems.Sawdust)); } } @@ -326,25 +334,21 @@ public final class OreDictManager { for (ItemStack logEntry : registeredOres) { if (logEntry.getItemDamage() == OreDictionary.WILDCARD_VALUE) { for (int j = 0; j < 16; j++) { - ItemStack log = new ItemStack(logEntry.getItem(), 1, j); - tempCrafting.setInventorySlotContents(0, log); - ItemStack resultEntry = MekanismUtils.findMatchingRecipe(tempCrafting, null); - - if (!resultEntry.isEmpty()) { - RecipeHandler.addPrecisionSawmillRecipe(log, StackUtils.size(resultEntry, 6), - new ItemStack(MekanismItems.Sawdust), 1); - } + addSawmillLog(tempCrafting, new ItemStack(logEntry.getItem(), 1, j)); } } else { - ItemStack log = StackUtils.size(logEntry, 1); - tempCrafting.setInventorySlotContents(0, log); - ItemStack resultEntry = MekanismUtils.findMatchingRecipe(tempCrafting, null); - - if (!resultEntry.isEmpty()) { - RecipeHandler.addPrecisionSawmillRecipe(log, StackUtils.size(resultEntry, 6), - new ItemStack(MekanismItems.Sawdust), 1); - } + addSawmillLog(tempCrafting, StackUtils.size(logEntry, 1)); } } } + + private static void addSawmillLog(InventoryCrafting tempCrafting, ItemStack log) { + tempCrafting.setInventorySlotContents(0, log); + ItemStack resultEntry = MekanismUtils.findMatchingRecipe(tempCrafting, null); + + if (!resultEntry.isEmpty()) { + RecipeHandler.addPrecisionSawmillRecipe(log, StackUtils.size(resultEntry, 6), + new ItemStack(MekanismItems.Sawdust), general.sawdustChanceLog); + } + } } diff --git a/src/main/java/mekanism/common/network/PacketConfigSync.java b/src/main/java/mekanism/common/network/PacketConfigSync.java index 74fb9e89e..b7d7a3ad3 100644 --- a/src/main/java/mekanism/common/network/PacketConfigSync.java +++ b/src/main/java/mekanism/common/network/PacketConfigSync.java @@ -59,7 +59,6 @@ public class PacketConfigSync implements IMessageHandler ResourceLocation resource = getGuiLocation(); addGuiElement(new GuiRedstoneControl(this, tileEntity, resource)); addGuiElement(new GuiSecurityTab(this, tileEntity, resource)); - addGuiElement(new GuiEnergyInfo(() -> Collections.EMPTY_LIST, this, resource)); + addGuiElement(new GuiEnergyInfo(Collections::emptyList, this, resource)); addGuiElement(new GuiSlot(SlotType.NORMAL, this, resource, 142, 34).with(SlotOverlay.POWER)); } diff --git a/src/main/java/mekanism/generators/common/GeneratorsCommonProxy.java b/src/main/java/mekanism/generators/common/GeneratorsCommonProxy.java index bd2873a95..c9a0ea302 100644 --- a/src/main/java/mekanism/generators/common/GeneratorsCommonProxy.java +++ b/src/main/java/mekanism/generators/common/GeneratorsCommonProxy.java @@ -104,52 +104,69 @@ public class GeneratorsCommonProxy implements IGuiProvider { * Set and load the mod's common configuration properties. */ public void loadConfiguration() { - generators.advancedSolarGeneration = Mekanism.configuration.get("generation", "AdvancedSolarGeneration", 300D) + generators.advancedSolarGeneration = Mekanism.configuration.get("generation", "AdvancedSolarGeneration", 300D, + "Peak output for the Advanced Solar Generator. Note: It can go higher than this value in some extreme environments.") .getDouble(); - generators.bioGeneration = Mekanism.configuration.get("generation", "BioGeneration", 350D).getDouble(); - generators.heatGeneration = Mekanism.configuration.get("generation", "HeatGeneration", 150D).getDouble(); - generators.heatGenerationLava = Mekanism.configuration.get("generation", "HeatGenerationLava", 5D).getDouble(); - generators.heatGenerationNether = Mekanism.configuration.get("generation", "HeatGenerationNether", 100D) + generators.bioGeneration = Mekanism.configuration.get("generation", "BioGeneration", 350D, + "Amount of energy in Joules the Bio Generator produces per tick.").getDouble(); + generators.heatGeneration = Mekanism.configuration.get("generation", "HeatGeneration", 150D, + "Amount of energy in Joules the Heat Generator produces per tick. (heatGenerationLava * heatGenerationLava) + heatGenerationNether") + .getDouble(); + generators.heatGenerationLava = Mekanism.configuration + .get("generation", "HeatGenerationLava", 5D, "Multiplier of effectiveness of Lava in the Heat Generator.") + .getDouble(); + generators.heatGenerationNether = Mekanism.configuration.get("generation", "HeatGenerationNether", 100D, + "Add this amount of Joules to the energy produced by a heat generator if it is in the Nether.") + .getDouble(); + generators.solarGeneration = Mekanism.configuration.get("generation", "SolarGeneration", 50D, + "Peak output for the Solar Generator. Note: It can go higher than this value in some extreme environments.") .getDouble(); - generators.solarGeneration = Mekanism.configuration.get("generation", "SolarGeneration", 50D).getDouble(); loadWindConfiguration(); - generators.turbineBladesPerCoil = Mekanism.configuration.get("generation", "TurbineBladesPerCoil", 4).getInt(); - generators.turbineVentGasFlow = Mekanism.configuration.get("generation", "TurbineVentGasFlow", 16000D) - .getDouble(); - generators.turbineDisperserGasFlow = Mekanism.configuration.get("generation", "TurbineDisperserGasFlow", 640D) - .getDouble(); - generators.condenserRate = Mekanism.configuration.get("generation", "TurbineCondenserFlowRate", 32000).getInt(); + generators.turbineBladesPerCoil = Mekanism.configuration.get("generation", "TurbineBladesPerCoil", 4, + "The number of blades on each turbine coil per blade applied.").getInt(); + generators.turbineVentGasFlow = Mekanism.configuration.get("generation", "TurbineVentGasFlow", 16000D, + "The rate at which steam is vented into the turbine.").getDouble(); + generators.turbineDisperserGasFlow = Mekanism.configuration.get("generation", "TurbineDisperserGasFlow", 640D, + "The rate at which steam is dispersed into the turbine.").getDouble(); + generators.condenserRate = Mekanism.configuration.get("generation", "TurbineCondenserFlowRate", 32000, + "The rate at which steam is condensed in the turbine.").getInt(); - generators.energyPerFusionFuel = Mekanism.configuration.get("generation", "EnergyPerFusionFuel", 5E6D) - .getDouble(); + generators.energyPerFusionFuel = Mekanism.configuration.get("generation", "EnergyPerFusionFuel", 5E6D, + "Affects the Injection Rate, Max Temp, and Ignition Temp.").getDouble(); for (GeneratorType type : GeneratorType.getGeneratorsForConfig()) { generators.generatorsManager.setEntry(type.blockName, - Mekanism.configuration.get("generators", type.blockName + "Enabled", true).getBoolean()); + Mekanism.configuration.get("generators", type.blockName + "Enabled", true, + "Allow " + type.blockName + " to be used/crafted.").getBoolean()); } - int[] windGenerationBlacklistDims = Mekanism.configuration - .get("generation", "WindGenerationDimBlacklist", new int[]{}).getIntList(); - generators.windGenerationDimBlacklist = IntStream.of(windGenerationBlacklistDims).boxed(). - collect(Collectors.toCollection(HashSet::new)); - if (Mekanism.configuration.hasChanged()) { Mekanism.configuration.save(); } } private void loadWindConfiguration() { - generators.windGenerationMin = Mekanism.configuration.get("generation", "WindGenerationMin", 60D).getDouble(); - generators.windGenerationMax = Mekanism.configuration.get("generation", "WindGenerationMax", 480D).getDouble(); + generators.windGenerationMin = Mekanism.configuration.get("generation", "WindGenerationMin", 60D, + "Minimum base generation value of the Wind Generator.").getDouble(); + generators.windGenerationMax = Mekanism.configuration.get("generation", "WindGenerationMax", 480D, + "Maximum base generation value of the Wind Generator.").getDouble(); //Ensure max > min to avoid division by zero later - final int minY = Mekanism.configuration.get("generation", "WindGenerationMinY", 24).getInt(); - final int maxY = Mekanism.configuration.get("generation", "WindGenerationMaxY", 255).getInt(); + final int minY = Mekanism.configuration.get("generation", "WindGenerationMinY", 24, + "The minimum Y value that affects the Wind Generators Power generation.").getInt(); + final int maxY = Mekanism.configuration.get("generation", "WindGenerationMaxY", 255, + "The maximum Y value that affects the Wind Generators Power generation.").getInt(); generators.windGenerationMinY = minY; generators.windGenerationMaxY = Math.max(minY + 1, maxY); + + int[] windGenerationBlacklistDims = Mekanism.configuration + .get("generation", "WindGenerationDimBlacklist", new int[]{}, + "The list of dimension ids that the Wind Generator will not generate power in.").getIntList(); + generators.windGenerationDimBlacklist = IntStream.of(windGenerationBlacklistDims).boxed(). + collect(Collectors.toCollection(HashSet::new)); } @Override diff --git a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java index 0fda43877..875ec193a 100644 --- a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java +++ b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java @@ -269,7 +269,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl @Override public double getMaxOutput() { - return 1000000000; + return Integer.MAX_VALUE; } @Override diff --git a/src/main/java/mekanism/tools/common/MekanismTools.java b/src/main/java/mekanism/tools/common/MekanismTools.java index bc79b8d70..a78a9a71f 100644 --- a/src/main/java/mekanism/tools/common/MekanismTools.java +++ b/src/main/java/mekanism/tools/common/MekanismTools.java @@ -109,213 +109,295 @@ public class MekanismTools implements IModule { public void addItems() { //Tools - toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN" - , Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "maxUses", 2500).getInt() - , - (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "efficiency", 20d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "damage", 10).getInt() - , Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "enchantability", 40).getInt() + toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", + Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "harvestLevel", 3, + "Harvest level of refined obsidian tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "maxUses", 2500, + "Maximum durability of refined obsidian tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "efficiency", 20D, + "Base speed of refined obsidian.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "damage", 10, + "Base attack damage of refined obsidian.").getInt(), + Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "enchantability", 40, + "Natural enchantability factor of refined obsidian.").getInt() ); - toolOBSIDIAN2 = EnumHelper.addToolMaterial("OBSIDIAN2" - , Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "maxUses", 3000).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "efficiency", 25d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "damage", 10).getInt() - , Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "enchantability", 50).getInt() + toolOBSIDIAN2 = EnumHelper.addToolMaterial("OBSIDIAN2", + Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "harvestLevel", 3, + "Harvest level of the refined obsidian paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "maxUses", 3000, + "Maximum durability of the refined obsidian paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "efficiency", 25D, + "Base speed of a refined obsidian paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "attackDamage", 10, + "Base attack damage of a refined obsidian paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.obsidian.paxel", "enchantability", 50, + "Natural enchantability factor of a refined obsidian paxel.").getInt() ); - toolLAZULI = EnumHelper.addToolMaterial("LAZULI" - , Mekanism.configuration.get("tools.tool-balance.lapis.regular", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.lapis.regular", "maxUses", 200).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.lapis.regular", "efficiency", 5d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.lapis.regular", "damage", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.lapis.regular", "enchantability", 8).getInt() + toolLAZULI = EnumHelper.addToolMaterial("LAZULI", + Mekanism.configuration.get("tools.tool-balance.lapis.regular", "harvestLevel", 2, + "Harvest level of lapis lazuli tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.lapis.regular", "maxUses", 200, + "Maximum durability of lapis lazuli tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.lapis.regular", "efficiency", 5D, + "Base speed of lapis lazuli.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.lapis.regular", "damage", 2, + "Base attack damage of lapis lazuli.").getInt(), + Mekanism.configuration.get("tools.tool-balance.lapis.regular", "enchantability", 8, + "Natural enchantability factor of lapis lazuli.").getInt() ); - toolLAZULI2 = EnumHelper.addToolMaterial("LAZULI2" - , Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "maxUses", 250).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "efficiency", 6d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "damage", 4).getInt() - , Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "enchantability", 10).getInt() + toolLAZULI2 = EnumHelper.addToolMaterial("LAZULI2", + Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "harvestLevel", 2, + "Harvest level of the lapis lazuli paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "maxUses", 250, + "Maximum durability of the lapis lazuli paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "efficiency", 6D, + "Base speed of a lapis lazuli paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "damage", 4, + "Base attack damage of a lapis lazuli paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.lapis.paxel", "enchantability", 10, + "Natural enchantability factor of a lapis lazuli paxel.").getInt() ); - toolOSMIUM = EnumHelper.addToolMaterial("OSMIUM" - , Mekanism.configuration.get("tools.tool-balance.osmium.regular", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.osmium.regular", "maxUses", 500).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "efficiency", 10d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.osmium.regular", "damage", 4).getInt() - , Mekanism.configuration.get("tools.tool-balance.osmium.regular", "enchantability", 12).getInt() + toolOSMIUM = EnumHelper.addToolMaterial("OSMIUM", + Mekanism.configuration.get("tools.tool-balance.osmium.regular", "harvestLevel", 2, + "Harvest level of osmium tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.osmium.regular", "maxUses", 500, + "Maximum durability of osmium tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "efficiency", 10D, + "Base speed of osmium.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.osmium.regular", "damage", 4, + "Base attack damage of osmium.").getInt(), + Mekanism.configuration.get("tools.tool-balance.osmium.regular", "enchantability", 12, + "Natural enchantability factor of osmium.").getInt() ); - toolOSMIUM2 = EnumHelper.addToolMaterial("OSMIUM2" - , Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "maxUses", 700).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "efficiency", 12d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "damage", 5).getInt() - , Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "enchantability", 16).getInt() + toolOSMIUM2 = EnumHelper.addToolMaterial("OSMIUM2", + Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "harvestLevel", 3, + "Harvest level of the osmium paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "maxUses", 700, + "Maximum durability of the osmium paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "efficiency", 12D, + "Base speed of an osmium paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "damage", 5, + "Base attack damage of an osmium paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.osmium.paxel", "enchantability", 16, + "Natural enchantability factor of an osmium paxel.").getInt() ); - toolBRONZE = EnumHelper.addToolMaterial("BRONZE" - , Mekanism.configuration.get("tools.tool-balance.bronze.regular", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.bronze.regular", "maxUses", 800).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "efficiency", 14d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.bronze.regular", "damage", 6).getInt() - , Mekanism.configuration.get("tools.tool-balance.bronze.regular", "enchantability", 10).getInt() + toolBRONZE = EnumHelper.addToolMaterial("BRONZE", + Mekanism.configuration.get("tools.tool-balance.bronze.regular", "harvestLevel", 2, + "Harvest level of bronze tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.bronze.regular", "maxUses", 800, + "Maximum durability of bronze tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "efficiency", 14D, + "Base speed of bronze.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.bronze.regular", "damage", 6, + "Base attack damage of bronze.").getInt(), + Mekanism.configuration.get("tools.tool-balance.bronze.regular", "enchantability", 10, + "Natural enchantability factor of bronze.").getInt() ); - toolBRONZE2 = EnumHelper.addToolMaterial("BRONZE2" - , Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "maxUses", 1100).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "efficiency", 16d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "damage", 10).getInt() - , Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "enchantability", 14).getInt() + toolBRONZE2 = EnumHelper.addToolMaterial("BRONZE2", + Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "harvestLevel", 3, + "Harvest level of the bronze paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "maxUses", 1100, + "Maximum durability of the bronze paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "efficiency", 16D, + "Base speed of a bronze paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "damage", 10, + "Base attack damage of a bronze paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.bronze.paxel", "enchantability", 14, + "Natural enchantability factor of a bronze paxel.").getInt() ); - toolGLOWSTONE = EnumHelper.addToolMaterial("GLOWSTONE" - , Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "maxUses", 300).getInt() - , - (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "efficiency", 14d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "damage", 5).getInt() - , Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "enchantability", 18).getInt() + toolGLOWSTONE = EnumHelper.addToolMaterial("GLOWSTONE", + Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "harvestLevel", 2, + "Harvest level of refined glowstone tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "maxUses", 300, + "Maximum durability of refined glowstone tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "efficiency", 14D, + "Base speed of refined glowstone.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "damage", 5, + "Base attack damage of refined glowstone.").getInt(), + Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "enchantability", 18, + "Natural enchantability factor of refined glowstone.").getInt() ); - toolGLOWSTONE2 = EnumHelper.addToolMaterial("GLOWSTONE2" - , Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "harvestLevel", 2).getInt() - , Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "maxUses", 450).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "efficiency", 18d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "damage", 5).getInt() - , Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "enchantability", 22).getInt() + toolGLOWSTONE2 = EnumHelper.addToolMaterial("GLOWSTONE2", + Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "harvestLevel", 2, + "Harvest level of the refined glowstone paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "maxUses", 450, + "Maximum durability of the refined glowstone paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "efficiency", 18D, + "Base speed of a refined glwostone paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "damage", 5, + "Base attack damage of a refined glowstone paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.glowstone.paxel", "enchantability", 22, + "Natural enchantability factor of a refined glowstone paxel.").getInt() ); - toolSTEEL = EnumHelper.addToolMaterial("STEEL" - , Mekanism.configuration.get("tools.tool-balance.steel.regular", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.steel.regular", "maxUses", 850).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "efficiency", 14d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.steel.regular", "damage", 4).getInt() - , Mekanism.configuration.get("tools.tool-balance.steel.regular", "enchantability", 10).getInt() + toolSTEEL = EnumHelper.addToolMaterial("STEEL", + Mekanism.configuration.get("tools.tool-balance.steel.regular", "harvestLevel", 3, + "Harvest level of steel tools.").getInt(), + Mekanism.configuration.get("tools.tool-balance.steel.regular", "maxUses", 850, + "Maximum durability of steel tools.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "efficiency", 14D, + "Base speed of steel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.steel.regular", "damage", 4, + "Base attack damage of steel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.steel.regular", "enchantability", 10, + "Natural enchantability factor of steel.").getInt() ); - toolSTEEL2 = EnumHelper.addToolMaterial("STEEL2" - , Mekanism.configuration.get("tools.tool-balance.steel.paxel", "harvestLevel", 3).getInt() - , Mekanism.configuration.get("tools.tool-balance.steel.paxel", "maxUses", 1250).getInt() - , (float) Mekanism.configuration.get("tools.tool-balance.steel.paxel", "efficiency", 18d).getDouble(0) - , Mekanism.configuration.get("tools.tool-balance.steel.paxel", "damage", 8).getInt() - , Mekanism.configuration.get("tools.tool-balance.steel.paxel", "enchantability", 14).getInt() + toolSTEEL2 = EnumHelper.addToolMaterial("STEEL2", + Mekanism.configuration.get("tools.tool-balance.steel.paxel", "harvestLevel", 3, + "Harvest level of the steel paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.steel.paxel", "maxUses", 1250, + "Maximum durability of the steel paxel.").getInt(), + (float) Mekanism.configuration.get("tools.tool-balance.steel.paxel", "efficiency", 18D, + "Base speed of a steel paxel.").getDouble(0), + Mekanism.configuration.get("tools.tool-balance.steel.paxel", "damage", 8, + "Base attack damage of a steel paxel.").getInt(), + Mekanism.configuration.get("tools.tool-balance.steel.paxel", "enchantability", 14, + "Natural enchantability factor of a steel paxel.").getInt() ); AXE_DAMAGE.put(toolOBSIDIAN, - (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "axeAttackDamage", 12D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "axeAttackDamage", 12D, + "Base attack damage of a refined obsidian axe.").getDouble()); AXE_SPEED.put(toolOBSIDIAN, - (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "axeAttackSpeed", -2D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.obsidian.regular", "axeAttackSpeed", -2D, + "Base attack speed of a refined obsidian axe.").getDouble()); AXE_DAMAGE.put(toolLAZULI, - (float) Mekanism.configuration.get("tools.tool-balance.lazuli.regular", "axeAttackDamage", 8D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.lazuli.regular", "axeAttackDamage", 8D, + "Base attack damage of a lapis lazuli axe.").getDouble()); AXE_SPEED.put(toolLAZULI, - (float) Mekanism.configuration.get("tools.tool-balance.lazuli.regular", "axeAttackSpeed", -3.1D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.lazuli.regular", "axeAttackSpeed", -3.1D, + "Base attack speed of a lapis lazuli axe.").getDouble()); AXE_DAMAGE.put(toolOSMIUM, - (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "axeAttackDamage", 8D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "axeAttackDamage", 8D, + "Base attack damage of an osmium axe.").getDouble()); AXE_SPEED.put(toolOSMIUM, - (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "axeAttackSpeed", -3D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.osmium.regular", "axeAttackSpeed", -3D, + "Base attack speed of an osmium axe.").getDouble()); AXE_DAMAGE.put(toolBRONZE, - (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "axeAttackDamage", 8D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "axeAttackDamage", 8D, + "Base attack damage of a bronze axe.").getDouble()); AXE_SPEED.put(toolBRONZE, - (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "axeAttackSpeed", -3.1D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.bronze.regular", "axeAttackSpeed", -3.1D, + "Base attack speed of a bronze axe.").getDouble()); AXE_DAMAGE.put(toolGLOWSTONE, - (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "axeAttackDamage", 8D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "axeAttackDamage", 8D, + "Base attack damage of a refined glowstone axe.").getDouble()); AXE_SPEED.put(toolGLOWSTONE, - (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "axeAttackSpeed", -3.1D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.glowstone.regular", "axeAttackSpeed", -3.1D, + "Base attack speed of a refined glowstone axe.").getDouble()); AXE_DAMAGE.put(toolSTEEL, - (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "axeAttackDamage", 8D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "axeAttackDamage", 8D, + "Base attack damage of a steel axe.").getDouble()); AXE_SPEED.put(toolSTEEL, - (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "axeAttackSpeed", -3D) - .getDouble()); + (float) Mekanism.configuration.get("tools.tool-balance.steel.regular", "axeAttackSpeed", -3D, + "Base attack speed of a steel axe.").getDouble()); //Armors - armorOBSIDIAN = EnumHelper.addArmorMaterial("OBSIDIAN", "TODO" - , Mekanism.configuration.get("tools.armor-balance.obsidian", "durability", 50).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "feet", 5).getInt(), - Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "legs", 8).getInt(), - Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "chest", 12).getInt(), - Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "head", 5).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.obsidian", "enchantability", 40).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_IRON - , (float) Mekanism.configuration.get("tools.armor-balance.obsidian", "toughness", 4D).getDouble() + armorOBSIDIAN = EnumHelper.addArmorMaterial("OBSIDIAN", "TODO", + Mekanism.configuration.get("tools.armor-balance.obsidian", "durability", 50, + "Base durability of refined obsidian armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "feet", 5, + "Protection value of refined obsidian boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "legs", 8, + "Protection value of refined obsidian leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "chest", 12, + "Protection value of refined obsidian chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.obsidian.protection", "head", 5, + "Protection value of refined obsidian helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.obsidian", "enchantability", 40, + "Natural enchantability factor of refined obsidian armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_IRON, + (float) Mekanism.configuration.get("tools.armor-balance.obsidian", "toughness", 4D, + "Base armor toughness value of refined obsidian armor.").getDouble() ); - armorLAZULI = EnumHelper.addArmorMaterial("LAZULI", "TODO" - , Mekanism.configuration.get("tools.armor-balance.lapis", "durability", 13).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.lapis.protection", "feet", 2).getInt(), - Mekanism.configuration.get("tools.armor-balance.lapis.protection", "legs", 6).getInt(), - Mekanism.configuration.get("tools.armor-balance.lapis.protection", "chest", 5).getInt(), - Mekanism.configuration.get("tools.armor-balance.lapis.protection", "head", 2).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.lapis", "enchantability", 8).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND - , (float) Mekanism.configuration.get("tools.armor-balance.lapis", "toughness", 0D).getDouble() + armorLAZULI = EnumHelper.addArmorMaterial("LAZULI", "TODO", + Mekanism.configuration.get("tools.armor-balance.lapis", "durability", 13, + "Base durability of lapis lazuli armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.lapis.protection", "feet", 2, + "Protection value of lapis lazuli boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.lapis.protection", "legs", 6, + "Protection value of lapis lazuli leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.lapis.protection", "chest", 5, + "Protection value of lapis lazuli chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.lapis.protection", "head", 2, + "Protection value of lapis lazuli helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.lapis", "enchantability", 8, + "Natural enchantability factor of lapis lazuli armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, + (float) Mekanism.configuration.get("tools.armor-balance.lapis", "toughness", 0D, + "Base armor toughness value of lapis lazuli armor.").getDouble() ); - armorOSMIUM = EnumHelper.addArmorMaterial("OSMIUM", "TODO" - , Mekanism.configuration.get("tools.armor-balance.osmium", "durability", 30).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.osmium.protection", "feet", 3).getInt(), - Mekanism.configuration.get("tools.armor-balance.osmium.protection", "legs", 6).getInt(), - Mekanism.configuration.get("tools.armor-balance.osmium.protection", "chest", 5).getInt(), - Mekanism.configuration.get("tools.armor-balance.osmium.protection", "head", 3).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.osmium", "enchantability", 12).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_IRON - , Mekanism.configuration.get("tools.armor-balance.osmium", "toughness", 1).getInt() + armorOSMIUM = EnumHelper.addArmorMaterial("OSMIUM", "TODO", + Mekanism.configuration.get("tools.armor-balance.osmium", "durability", 30, + "Base durability of osmium armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.osmium.protection", "feet", 3, + "Protection value of osmium boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.osmium.protection", "legs", 6, + "Protection value of osmium leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.osmium.protection", "chest", 5, + "Protection value of osmium chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.osmium.protection", "head", 3, + "Protection value of osmium helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.osmium", "enchantability", 12, + "Natural enchantability factor of osmium armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_IRON, + Mekanism.configuration.get("tools.armor-balance.osmium", "toughness", 1, + "Base armor toughness value of osmium armor.").getInt() ); - armorBRONZE = EnumHelper.addArmorMaterial("BRONZE", "TODO" - , Mekanism.configuration.get("tools.armor-balance.bronze", "durability", 35).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.bronze.protection", "feet", 2).getInt(), - Mekanism.configuration.get("tools.armor-balance.bronze.protection", "legs", 5).getInt(), - Mekanism.configuration.get("tools.armor-balance.bronze.protection", "chest", 6).getInt(), - Mekanism.configuration.get("tools.armor-balance.bronze.protection", "head", 3).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.bronze", "enchantability", 10).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_IRON - , (float) Mekanism.configuration.get("tools.armor-balance.bronze", "toughness", 0D).getDouble() + armorBRONZE = EnumHelper.addArmorMaterial("BRONZE", "TODO", + Mekanism.configuration.get("tools.armor-balance.bronze", "durability", 35, + "Base durability of bronze armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.bronze.protection", "feet", 2, + "Protection value of bronze boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.bronze.protection", "legs", 5, + "Protection value of bronze leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.bronze.protection", "chest", 6, + "Protection value of bronze chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.bronze.protection", "head", 3, + "Protection value of bronze helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.bronze", "enchantability", 10, + "Natural enchantability factor of bronze armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_IRON, + (float) Mekanism.configuration.get("tools.armor-balance.bronze", "toughness", 0D, + "Base armor toughness value of bronze armor.").getDouble() ); - armorGLOWSTONE = EnumHelper.addArmorMaterial("GLOWSTONE", "TODO" - , Mekanism.configuration.get("tools.armor-balance.glowstone", "durability", 18).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "feet", 3).getInt(), - Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "legs", 6).getInt(), - Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "chest", 7).getInt(), - Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "head", 3).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.glowstone", "enchantability", 18).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_IRON - , (float) Mekanism.configuration.get("tools.armor-balance.glowstone", "toughness", 0D).getDouble() + armorGLOWSTONE = EnumHelper.addArmorMaterial("GLOWSTONE", "TODO", + Mekanism.configuration.get("tools.armor-balance.glowstone", "durability", 18, + "Base durability of refined glowstone armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "feet", 3, + "Protection value of refined glowstone boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "legs", 6, + "Protection value of refined glowstone leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "chest", 7, + "Protection value of refined glowstone chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.glowstone.protection", "head", 3, + "Protection value of refined glowstone helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.glowstone", "enchantability", 18, + "Natural enchantability factor of refined glowstone armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_IRON, + (float) Mekanism.configuration.get("tools.armor-balance.glowstone", "toughness", 0D, + "Base armor toughness value of refined glowstone armor.").getDouble() ); - armorSTEEL = EnumHelper.addArmorMaterial("STEEL", "TODO" - , Mekanism.configuration.get("tools.armor-balance.steel", "durability", 40).getInt() - , new int[] - { - Mekanism.configuration.get("tools.armor-balance.steel.protection", "feet", 3).getInt(), - Mekanism.configuration.get("tools.armor-balance.steel.protection", "legs", 6).getInt(), - Mekanism.configuration.get("tools.armor-balance.steel.protection", "chest", 7).getInt(), - Mekanism.configuration.get("tools.armor-balance.steel.protection", "head", 3).getInt() - } - , Mekanism.configuration.get("tools.armor-balance.steel", "enchantability", 10).getInt() - , SoundEvents.ITEM_ARMOR_EQUIP_IRON - , (float) Mekanism.configuration.get("tools.armor-balance.steel", "toughness", 1D).getDouble() + armorSTEEL = EnumHelper.addArmorMaterial("STEEL", "TODO", + Mekanism.configuration.get("tools.armor-balance.steel", "durability", 40, + "Base durability of steel armor.").getInt(), new int[]{ + Mekanism.configuration.get("tools.armor-balance.steel.protection", "feet", 3, + "Protection value of steel boots.").getInt(), + Mekanism.configuration.get("tools.armor-balance.steel.protection", "legs", 6, + "Protection value of steel leggings.").getInt(), + Mekanism.configuration.get("tools.armor-balance.steel.protection", "chest", 7, + "Protection value of steel chestplates.").getInt(), + Mekanism.configuration.get("tools.armor-balance.steel.protection", "head", 3, + "Protection value of steel helmets.").getInt() + }, Mekanism.configuration.get("tools.armor-balance.steel", "enchantability", 10, + "Natural enchantability factor of steel armor.").getInt(), + SoundEvents.ITEM_ARMOR_EQUIP_IRON, + (float) Mekanism.configuration.get("tools.armor-balance.steel", "toughness", 1D, + "Base armor toughness value of steel armor.").getDouble() ); if (Mekanism.configuration.hasChanged()) { diff --git a/src/main/java/mekanism/tools/common/ToolsCommonProxy.java b/src/main/java/mekanism/tools/common/ToolsCommonProxy.java index eea581b8b..f79d84e1f 100644 --- a/src/main/java/mekanism/tools/common/ToolsCommonProxy.java +++ b/src/main/java/mekanism/tools/common/ToolsCommonProxy.java @@ -9,8 +9,9 @@ public class ToolsCommonProxy { * Set and load the mod's common configuration properties. */ public void loadConfiguration() { - tools.armorSpawnRate = Mekanism.configuration.get("tools.general", "MobArmorSpawnRate", 0.03, null, 0.00, 1.00) - .getDouble(0.03); + tools.armorSpawnRate = Mekanism.configuration + .get("tools.general", "MobArmorSpawnRate", 0.03, "The chance that Mekanica Armor can spawn on mobs.", + 0.00, 1.00).getDouble(0.03); if (Mekanism.configuration.hasChanged()) { Mekanism.configuration.save(); diff --git a/src/main/resources/assets/mekanism/lang/en_us.lang b/src/main/resources/assets/mekanism/lang/en_us.lang index 6e907eb4c..414ffce4b 100644 --- a/src/main/resources/assets/mekanism/lang/en_us.lang +++ b/src/main/resources/assets/mekanism/lang/en_us.lang @@ -496,6 +496,7 @@ gui.dynamicTank=Dynamic Tank gui.industrialTurbine=Industrial Turbine gui.thermoelectricBoiler=Thermoelectric Boiler gui.visuals=Visuals +mekanism.gui.visuals.toobig=Radius too big to display visuals gui.noEject=Can't Eject gui.undefined=Undefined gui.owner=Owner