This commit is contained in:
Anuken
2021-11-04 19:34:28 -04:00
parent b418afed63
commit 9e68b0a72b
2 changed files with 6 additions and 2 deletions

View File

@@ -56,6 +56,10 @@ public class Attributes implements JsonSerializable{
}
private void check(){
if(arr.length != Attribute.all.length) arr = new float[Attribute.all.length];
if(arr.length != Attribute.all.length){
var last = arr;
arr = new float[Attribute.all.length];
System.arraycopy(last, 0, arr, 0, Math.min(last.length, arr.length));
}
}
}