diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b8a7f295..35e36897e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ NOTE: Worlds that used Refined Storage 1.5.x are fully compatible with Refined S - Added new storage disk system where the storage disk data (items, fluids) are stored off the disk itself, in another file (refinedstorage_disks.dat). The disk itself only stores its ID (raoulvdberge) - Added /createdisk command which creates a disk based on the disk ID. Turn on advanced tooltips to see the disk ID on a disk item (raoulvdberge) - Added config option to configure energy capacity of Refined Storage items (raoulvdberge) +- Added config option to change Reader / Writer channel energy capacity (raoulvdberge) - Changed fluid storage progression to be 64k - 256k - 1024k - 4096k (raoulvdberge) - You can no longer put a Filter in filter slots to gain additional filter slots (raoulvdberge) - You can now re-insert Processing Patterns in the Pattern Grid and have the inputs and outputs be completed (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/RSConfig.java b/src/main/java/com/raoulvdberge/refinedstorage/RSConfig.java index af62119c8..877f759c9 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/RSConfig.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/RSConfig.java @@ -48,8 +48,6 @@ public class RSConfig { public float networkTransmitterPerBlockUsage; public int networkReceiverUsage; public int diskManipulatorUsage; - public int readerUsage; - public int writerUsage; public int securityManagerUsage; public int securityManagerPerSecurityCardUsage; //endregion @@ -113,6 +111,12 @@ public class RSConfig { public int fortuneUpgradeUsagePerFortune; //endregion + //region Readers and Writers + public int readerUsage; + public int writerUsage; + public int readerWriterChannelEnergyCapacity; + //endregion + //region Categories private static final String ENERGY = "energy"; private static final String CONTROLLER = "controller"; @@ -123,6 +127,7 @@ public class RSConfig { private static final String WIRELESS_FLUID_GRID = "wirelessFluidGrid"; private static final String WIRELESS_CRAFTING_MONITOR = "wirelessCraftingMonitor"; private static final String UPGRADES = "upgrades"; + private static final String READER_WRITER = "readerWriter"; //endregion public RSConfig(@Nullable RSConfig originalClientVersion, File configFile) { @@ -187,8 +192,6 @@ public class RSConfig { networkTransmitterPerBlockUsage = config.getFloat("networkTransmitterPerBlock", ENERGY, 1, 0, Float.MAX_VALUE, "The additional energy per block that the Network Transmitter uses, gets rounded up"); networkReceiverUsage = config.getInt("networkReceiver", ENERGY, 0, 0, Integer.MAX_VALUE, "The energy used by Network Receivers"); diskManipulatorUsage = config.getInt("diskManipulator", ENERGY, 3, 0, Integer.MAX_VALUE, "The energy used by Disk Manipulators"); - readerUsage = config.getInt("reader", ENERGY, 2, 0, Integer.MAX_VALUE, "The energy used by Readers"); - writerUsage = config.getInt("writer", ENERGY, 2, 0, Integer.MAX_VALUE, "The energy used by Writers"); securityManagerUsage = config.getInt("securityManager", ENERGY, 4, 0, Integer.MAX_VALUE, "The base energy used by Security Managers"); securityManagerPerSecurityCardUsage = config.getInt("securityManagerPerSecurityCard", ENERGY, 10, 0, Integer.MAX_VALUE, "The additional energy used by Security Cards in Security Managers"); //endregion @@ -252,6 +255,12 @@ public class RSConfig { fortuneUpgradeUsagePerFortune = config.getInt("fortune", UPGRADES, 10, 0, Integer.MAX_VALUE, "The additional energy used by the Fortune Upgrade, multiplied by the level of the enchantment"); //endregion + //region Readers and Writers + readerUsage = config.getInt("reader", READER_WRITER, 2, 0, Integer.MAX_VALUE, "The energy used by Readers"); + writerUsage = config.getInt("writer", READER_WRITER, 2, 0, Integer.MAX_VALUE, "The energy used by Writers"); + readerWriterChannelEnergyCapacity = config.getInt("channelEnergyCapacity", READER_WRITER, 16000, 0, Integer.MAX_VALUE, "The energy capacity of energy channels"); + //endregion + if (config.hasChanged()) { config.save(); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/integration/forgeenergy/ReaderWriterHandlerForgeEnergy.java b/src/main/java/com/raoulvdberge/refinedstorage/integration/forgeenergy/ReaderWriterHandlerForgeEnergy.java index ddea0710a..880a285dc 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/integration/forgeenergy/ReaderWriterHandlerForgeEnergy.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/integration/forgeenergy/ReaderWriterHandlerForgeEnergy.java @@ -1,5 +1,6 @@ package com.raoulvdberge.refinedstorage.integration.forgeenergy; +import com.raoulvdberge.refinedstorage.RS; import com.raoulvdberge.refinedstorage.api.network.readerwriter.IReader; import com.raoulvdberge.refinedstorage.api.network.readerwriter.IReaderWriterChannel; import com.raoulvdberge.refinedstorage.api.network.readerwriter.IReaderWriterHandler; @@ -7,7 +8,7 @@ import com.raoulvdberge.refinedstorage.api.network.readerwriter.IWriter; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.text.TextComponentTranslation; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.EnergyStorage; @@ -58,7 +59,7 @@ public class ReaderWriterHandlerForgeEnergy implements IReaderWriterHandler { private EnergyStorageReaderWriter storageReader, storageWriter; public ReaderWriterHandlerForgeEnergy(@Nullable NBTTagCompound tag) { - this.storage = new EnergyStorage(16000); + this.storage = new EnergyStorage(RS.INSTANCE.config.readerWriterChannelEnergyCapacity); this.storageReader = new EnergyStorageReaderWriter(storage, false, true); this.storageWriter = new EnergyStorageReaderWriter(storage, true, false); @@ -153,7 +154,7 @@ public class ReaderWriterHandlerForgeEnergy implements IReaderWriterHandler { return Collections.emptyList(); } - return Collections.singletonList(new TextComponentString(storage.getEnergyStored() + " FE / " + storage.getMaxEnergyStored() + " FE")); + return Collections.singletonList(new TextComponentTranslation("misc.refinedstorage:energy_stored", storage.getEnergyStored(), storage.getMaxEnergyStored())); } private class EnergyStorageReaderWriter implements IEnergyStorage {