Merge remote-tracking branch 'origin/main'

This commit is contained in:
paulevsGitch 2021-08-14 16:49:09 +03:00
commit 1f0403d1b3
2 changed files with 4 additions and 3 deletions

View file

@ -59,7 +59,7 @@ abstract public class DataExchange {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (!(o instanceof AutoSyncID)) return false;
AutoSyncID that = (AutoSyncID) o; AutoSyncID that = (AutoSyncID) o;
return uniqueID.equals(that.uniqueID) && modID.equals(that.modID); return uniqueID.equals(that.uniqueID) && modID.equals(that.modID);
} }

View file

@ -33,8 +33,9 @@ public abstract class Config {
if (autoSync) { if (autoSync) {
final String uid = "CONFIG_" + modID + "_" + group; final String uid = "CONFIG_" + modID + "_" + group;
DataExchangeAPI.addAutoSyncFile(BCLib.MOD_ID, uid, keeper.getConfigFile()); final DataExchange.AutoSyncID aid = new DataExchange.AutoSyncID(BCLib.MOD_ID, uid);
autoSyncConfigs.put(new DataExchange.AutoSyncID(modID, uid), this); DataExchangeAPI.addAutoSyncFile(aid.modID, aid.uniqueID, keeper.getConfigFile());
autoSyncConfigs.put(aid, this);
} }
} }