So I just switched all my item and block registrations for one of my mods over to use the registry events. However now I want to add the ability to define some details of tools in a json and read that file before registering them.
Simply, is there a way to get the suggested configuration directory in the registry events, a bit like how you normally would using FMLPreInitializationEvent#getModConfigurationDirectory?
What are you trying to do? Maybe there's a way around it..
Anyways, there may be a workaround for getting the config file: Just create the file manually using the MinecraftServer instance from the FMLCommonHandler
Well like I said, I'm registering all my items and blocks using the registry events now, rather than the initialisation events. Since the registry events are called before pre-init, I can't make use of FMLPreInitializationEvent#getModConfigurationDirectory.
I'm not quite sure I follow with creating the file using the MinecraftServer? This will need to be on client and server though right? Since it's data needed for the items, so I can't only do it on the server. Also I can't find a reference any of the directories. I saw MinecraftServer#getDataDirectory, but that only returns new File(".").