Created @Interpolate annotation for Interpolators to know which fields to interpolate (instead of all public fields)

This commit is contained in:
CrushedPixel
2015-07-08 11:43:58 +02:00
parent 64628eaac3
commit 8a973fa3e9
7 changed files with 23 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
package eu.crushedpixel.replaymod.holders;
import eu.crushedpixel.replaymod.interpolation.Interpolate;
import eu.crushedpixel.replaymod.interpolation.KeyframeValue;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
@@ -8,6 +9,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class Point extends KeyframeValue {
@Interpolate
public double x, y;
}

View File

@@ -1,5 +1,6 @@
package eu.crushedpixel.replaymod.holders;
import eu.crushedpixel.replaymod.interpolation.Interpolate;
import eu.crushedpixel.replaymod.interpolation.KeyframeValue;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,7 +15,9 @@ import net.minecraft.entity.Entity;
@EqualsAndHashCode(callSuper=true)
public class Position extends KeyframeValue {
@Interpolate
public double x, y, z;
@Interpolate
public double pitch, yaw, roll;
private Integer spectatedEntityID;

View File

@@ -1,5 +1,6 @@
package eu.crushedpixel.replaymod.holders;
import eu.crushedpixel.replaymod.interpolation.Interpolate;
import eu.crushedpixel.replaymod.interpolation.KeyframeValue;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
@@ -8,6 +9,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class TimestampValue extends KeyframeValue {
@Interpolate
public double value;
}