Fix purpur bounding boxes (#30)

This commit is contained in:
Pierre Maurice Schwang 2021-07-24 13:24:43 +02:00 committed by GitHub
parent ee7bb54894
commit 072a583643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import de.gerrygames.viarewind.legacysupport.reflection.ReflectionAPI;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.stream.Stream;
@ -99,7 +100,7 @@ public class BoundingBoxFixer {
private static void setAxisAlignedBB(Object boundingBox, double[] values) throws ReflectiveOperationException {
Field[] doubleFields = Arrays.stream(boundingBox.getClass().getDeclaredFields())
.filter(f -> f.getType() == double.class)
.filter(f -> f.getType() == double.class && !Modifier.isStatic(f.getModifiers()))
.toArray(Field[]::new);
if (doubleFields.length < 6) {