Cleanroom
Cleanroom copied to clipboard
Remove the configuration file registration restriction.
This method is for classes without ASMData.
- In addition to Coremod, dynamically generated classes also need to use it.
- Synchronization in general, such as the following code, does not work properly due to the lack of ASMDataTable. And we cannot use it when synchronization is required.
@SubscribeEvent
public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) {
if (Reference.MODID.equals(event.getModID())) {
ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); // Want to sync the data in class
}
}
(the register(Class) has the same function of sync...)