With the amount of mods adding status effects and potion effects, it is not uncommon to find yourself short of IDs when building your own modpack.
Enter: Max Potion ID Extender. It's a small coremod that lifts the limit to the max value of a 32bit integer (something around 2 Billion IDs).
Please do note that:
A) This might have unforeseen side effects. If you find any please report them immediately.
B) This is needed both client side and server side. If you install it on your client and try to connect to a server that doesn't have it, there might be weird and unpredictable consequences. You won't be able to join a server with it if you don't have it on your client as well.
C) This might break your worlds. Please backup before installing and before uninstalling the mod.
D) This only works for minecraft 1.12.2. I won't backport because this mod is extremely difficult to code. 1.13 won't need this because it supports it natively, so I won't update it for future versions either.