Mineuniverse
Mods
AE2 KeyCounter Overflow Fix

AE2 KeyCounter Overflow Fix

MOD
Fixes an integer overflow issue in Applied Energistics 2's `VariantCounter` that can cause AE2 key counts to overflow when approaching the `long` limit.
by takenokoshi_023
Download Claim this project
3,403 downloads
0 likes
0 followers
Updated Oct 14, 2026
0 hypes
Follow0
Applied Energistics 2 Bug Fixes
Advertisement Remove ads with Premium →

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.

ae2keycounteroverflowfix-1.20.1-1.0.0-all.jar
MC Client, 1.20.1, Forge, Server
Release 2026-08-08 Get
ae2keycounteroverflowfix-1.21.1-1.0.0.jar
MC Client, 1.21.1, NeoForge, Server
Release 2026-08-07 Get

More from takenokoshi_023

Advertisement Remove ads with Premium →

You Might Also Like