LockObserveList implementation, tests for Lock and List
This commit is contained in:
@@ -6,17 +6,23 @@ package mc.core;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import mc.core.world.Chunk;
|
||||
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class Location implements Serializable{
|
||||
public class Location implements Serializable {
|
||||
private double x, y, z;
|
||||
|
||||
public Location(long compactValue) {
|
||||
set(compactValue);
|
||||
}
|
||||
|
||||
private static int floor_double(double value) {
|
||||
int i = (int)value;
|
||||
return value < (double)i ? i - 1 : i;
|
||||
int i = (int) value;
|
||||
return value < (double) i ? i - 1 : i;
|
||||
}
|
||||
|
||||
public static Location copyOf(Location location) {
|
||||
@@ -27,12 +33,8 @@ public class Location implements Serializable{
|
||||
);
|
||||
}
|
||||
|
||||
public static Location startPointLocation () {
|
||||
return new Location(0,10,0);
|
||||
}
|
||||
|
||||
public Location(long compactValue) {
|
||||
set(compactValue);
|
||||
public static Location startPointLocation() {
|
||||
return new Location(0, 10, 0);
|
||||
}
|
||||
|
||||
public void set(Location location) {
|
||||
@@ -55,6 +57,11 @@ public class Location implements Serializable{
|
||||
);
|
||||
}
|
||||
|
||||
public Chunk getChunk() {
|
||||
// TODO: Implement
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int getBlockX() {
|
||||
return (int) x;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user