[fix] fixes instancing on RocketComponent.toDebugTree

This commit is contained in:
Daniel_M_Williams 2020-05-02 13:27:42 -04:00
parent bb3cdf2ce8
commit bbef167bbc

View File

@ -2179,7 +2179,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
for (int instanceNumber = 0; instanceNumber < this.getInstanceCount(); instanceNumber++) {
final String instancePrefix = String.format("%s [%2d/%2d]", indent, instanceNumber+1, getInstanceCount());
buffer.append(String.format("%-40s| %5.3f; %24s; %24s;\n", instancePrefix, getLength(), this.axialOffset, getLocations()[0]));
buffer.append(String.format("%-40s| %5.3f; %24s; %24s;\n", instancePrefix, getLength(), this.axialOffset, getLocations()[instanceNumber]));
}
}else{
throw new IllegalStateException("This is a developer error! If you implement an instanced class, please subclass the Instanceable interface.");