From 072a5836437197a3a9e1fd446a7d264801a9a6ff Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sat, 24 Jul 2021 13:24:43 +0200 Subject: [PATCH] Fix purpur bounding boxes (#30) --- .../viarewind/legacysupport/injector/BoundingBoxFixer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/gerrygames/viarewind/legacysupport/injector/BoundingBoxFixer.java b/src/main/java/de/gerrygames/viarewind/legacysupport/injector/BoundingBoxFixer.java index d67deb8..af3d6a3 100644 --- a/src/main/java/de/gerrygames/viarewind/legacysupport/injector/BoundingBoxFixer.java +++ b/src/main/java/de/gerrygames/viarewind/legacysupport/injector/BoundingBoxFixer.java @@ -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) {