You need to create and register a custom MenuType and register it like any other registry entry. Use IForgeMenuType for this. Register a ScreenConstructor using MenuScreens.register in FMLClientSetupEvent#enqueueWork.
Implement INBTSerializable on your ICapabilityProvider.
Because the jar is not runnable. Java 9 and the module system removed the way to have executable jars. So, because Minecraft 1.16 uses Java 16 we can no longer just have an executable jar file. A script is necessary.