Created @Interpolate annotation for Interpolators to know which fields to interpolate (instead of all public fields)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package eu.crushedpixel.replaymod.interpolation;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -23,7 +22,7 @@ public class GenericLinearInterpolation<T extends KeyframeValue> implements Inte
|
||||
|
||||
List<Field> fields = new ArrayList<Field>();
|
||||
for(Field f : point.getClass().getDeclaredFields()) {
|
||||
if(Modifier.isPublic(f.getModifiers())) {
|
||||
if(f.isAnnotationPresent(Interpolate.class)) {
|
||||
fields.add(f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user