Created Attributes#getCopy(short) to return a (temp) copy of the specified stat

This commit is contained in:
Collin Smith 2020-09-10 16:45:00 -07:00
parent 00f75d014c
commit ff24b9f516

View File

@ -228,6 +228,11 @@ public final class Attributes implements Iterable<StatRef> {
return agg.get(stat);
}
public StatRef getCopy(final short stat) {
final StatRef ref = agg.get(stat);
return ref != null ? ref.copy() : null;
}
public StatRef set(final short stat, final short srcStat) {
return agg.set(stat, srcStat);
}