Places new CustomImageObjects at Camera's exact instead of Block Position

This commit is contained in:
CrushedPixel
2015-08-16 15:37:21 +02:00
parent 5cb4682ad9
commit 0746004421
2 changed files with 8 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import eu.crushedpixel.replaymod.interpolation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.minecraft.entity.Entity;
import net.minecraft.util.BlockPos;
@Data
@@ -25,6 +26,12 @@ public class Position implements KeyframeValue {
this.z = pos.getZ();
}
public Position(Entity entity) {
this.x = entity.posX;
this.y = entity.posY;
this.z = entity.posZ;
}
@Override
public Interpolation getLinearInterpolator() {
return new GenericLinearInterpolation<Position>();