The capacity can now be changed by the current holding battery, just as long as both voltages (receiving and extraction) match. It's now also correctly handled from other angles, such as the charger or stacks' durability bars, by calling IItemElectric#getMaximumCapacity instead of accessing ElectricItemProperties#capacity directly.
(changes to CreativeTabSupplier#addCreativeModeItems are technically not needed and unecessary overhead, but its better to have consistency, i do think)
While this may not be immediately beneficial to the base mod, I do believe that addons looking to add other types of battery (same voltage as base mod, different capacities) would be helped.
This is on a different branch so as to not come packaged with the patches in the other PR, in case these changes turn out to be undesired.
The capacity can now be changed by the current holding battery, just as long as both voltages (receiving and extraction) match. It's now also correctly handled from other angles, such as the charger or stacks' durability bars, by calling
IItemElectric#getMaximumCapacity
instead of accessingElectricItemProperties#capacity
directly. (changes toCreativeTabSupplier#addCreativeModeItems
are technically not needed and unecessary overhead, but its better to have consistency, i do think)While this may not be immediately beneficial to the base mod, I do believe that addons looking to add other types of battery (same voltage as base mod, different capacities) would be helped.
This is on a different branch so as to not come packaged with the patches in the other PR, in case these changes turn out to be undesired.