Added constructor to Position which takes a BlockPos
This commit is contained in:
@@ -5,6 +5,7 @@ import eu.crushedpixel.replaymod.interpolation.KeyframeValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@@ -19,4 +20,10 @@ public class Position implements KeyframeValue {
|
||||
return new Position();
|
||||
}
|
||||
|
||||
public Position(BlockPos pos) {
|
||||
this.x = pos.getX();
|
||||
this.y = pos.getY();
|
||||
this.z = pos.getZ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user