Included Path Interpolation methods in KeyframeList and uses it in PathPreviewRenderer

Created newInstance() method in KeyframeValue interface
This commit is contained in:
CrushedPixel
2015-07-08 23:55:48 +02:00
parent cd27ccd855
commit 16b74d9824
12 changed files with 97 additions and 77 deletions

View File

@@ -4,7 +4,6 @@ import eu.crushedpixel.replaymod.interpolation.Interpolate;
import eu.crushedpixel.replaymod.interpolation.KeyframeValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
@@ -12,8 +11,7 @@ import net.minecraft.entity.Entity;
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=true)
public class Position extends KeyframeValue {
public class Position implements KeyframeValue {
@Interpolate
public double x, y, z;
@@ -44,4 +42,9 @@ public class Position extends KeyframeValue {
double dz = this.z - z;
return dx * dx + dy * dy + dz * dz;
}
@Override
public Position newInstance() {
return new Position();
}
}