mirror of
https://github.com/ViaVersion/ViaRewind-Legacy-Support.git
synced 2024-11-14 10:15:31 +01:00
Fix purpur bounding boxes (#30)
This commit is contained in:
parent
ee7bb54894
commit
072a583643
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user