Explicitly clone ID

This commit is contained in:
SiboVG 2023-06-29 19:18:25 +02:00
parent 3277f757d7
commit 688ccc9b45

View File

@ -408,7 +408,8 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
checkState(); checkState();
RocketComponent clone; RocketComponent clone;
try { try {
clone = (RocketComponent) this.clone(); clone = this.clone();
clone.id = this.id;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new BugException("CloneNotSupportedException encountered, report a bug!", e); throw new BugException("CloneNotSupportedException encountered, report a bug!", e);
} }