I'm pretty sure that when I changed this a while back, I either messed up the loading or i forgot to fully fix this, but this should fix the issue with the cloning of the items resulting in having a bunch of element stats added to the new Statdata!

This commit is contained in:
Rosenthalk0 2023-04-14 19:07:32 -05:00
parent 99e893801d
commit 2a7f81339e

View File

@ -41,7 +41,13 @@ public class ElementListData implements Mergeable {
@Override
public StatData cloneData() {
ElementListData ret = new ElementListData();
stats.forEach((key, value) -> ret.stats.put(key, value));
for (Map.Entry<Pair<Element, ElementStatType>, Double> entry : stats.entrySet()) {
Pair<Element, ElementStatType> key = entry.getKey();
Double value = entry.getValue();
if (value != 0) {
ret.stats.put(key, value);
}
}
return ret;
}