AE2 KeyCounter Overflow Fix
Modby takenokoshi_023
Fixes an integer overflow issue in Applied Energistics 2's `VariantCounter` that can cause AE2 key counts to overflow when approaching the `long` limit.
Type
Mod
CurseForge Downloads
2,326
CurseForge ID
1643789
Last Updated
Sep 19, 2026
Description
AE2 KeyCounter Overflow Fix
AE2's VariantCounter uses a long to store the amount of each AEKey. When the stored amount approaches the maximum value of a long, adding more items can cause an integer overflow, resulting in an incorrect (potentially negative) amount.
This mod fixes this issue by preventing VariantCounter from exceeding the valid range of a Java long.
When an addition would cause an overflow, the amount is automatically clamped to the maximum or minimum representable value instead.
This mod is intended as a lightweight compatibility and bug-fix mod. It does not add any new gameplay features or content.
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Similar Mods
Best Bundles
Bundles, the better way nature intended. Dyeable, with 4x increased capacity! Enables the bundle without having to enab...
Mushroom Fox Mod
A mod that adds alot of stuff but mainly a new mob : the Mushroom Fox
Dragon Rings
■ Create your own speed races, mazes, and parkour zones using rings, boosts, bonuses, locked gates, redstone, and DRAGON...
Door_Knocker (horror)
Someone might knock on or even open a door. It would be more noticeable and dangerous in the night.
Scape and Run: Dimension
Adds a new dimension completely infested with parasites.
project-1355686
Adds smooth, fluid, and realistic animations to enhance Minecraft’s experience!