@@ -0,0 +1,1013 @@
+package net.shadowfacts.enfusion.energy;%0A%0Aimport cofh.api.energy.EnergyStorage;%0A%0Aimport net.minecraft.nbt.NBTTagCompound;%0A%0A/**%0A * EnergyStorage which includes capacity.%0A * @author shadowfacts%0A */%0Apublic class BaseEnergyStorage extends EnergyStorage %7B%0A%0A%09public BaseEnergyStorage(int capacity) %7B%0A%09%09this(capacity, capacity);%0A%09%7D%0A%0A%09public BaseEnergyStorage(int capacity, int maxTransfer) %7B%0A%09%09this(capacity, maxTransfer, maxTransfer);%0A%09%7D%0A%0A%09public BaseEnergyStorage(int capacity, int maxReceieve, int maxExtract) %7B%0A%09%09super(capacity, maxReceieve, maxExtract);%0A%09%7D%0A%0A%09@Override%0A%09public BaseEnergyStorage readFromNBT(NBTTagCompound nbt) %7B%0A%09%09this.capacity = nbt.getInteger(%22Capacity%22);%0A%0A%09%09this.energy = nbt.getInteger(%22Energy%22);%0A%09%09if (energy %3E capacity) %7B%0A%09%09%09energy = capacity;%0A%09%09%7D%0A%0A%09%09return this;%0A%09%7D%0A%0A%09@Override%0A%09public NBTTagCompound writeToNBT(NBTTagCompound nbt) %7B%0A%09%09nbt.setInteger(%22Capacity%22, this.capacity);%0A%0A%09%09if (this.energy %3C 0) %7B%0A%09%09%09this.energy = 0;%0A%09%09%7D%0A%09%09nbt.setInteger(%22Energy%22, this.energy);%0A%0A%09%09return nbt;%0A%09%7D%0A%0A%7D%0A

Add BaseEnergyStorage to replace default CoFH EnergyStorage