package com.irtimaled.bbor.client.renderers;
-import com.irtimaled.bbor.client.Player;
import com.irtimaled.bbor.client.models.Point;
import com.irtimaled.bbor.common.models.Coords;
+import java.util.Objects;
+
class OffsetPoint {
private final Point point;
this(new Point(coords));
}
- private OffsetPoint(Point point) {
+ OffsetPoint(Point point) {
this.point = point;
}
double getX() {
- return point.getX() - Player.getX();
+ return point.getX();
}
double getY() {
- return point.getY() - Player.getY();
+ return point.getY();
}
double getZ() {
- return point.getZ() - Player.getZ();
+ return point.getZ();
}
OffsetPoint offset(double x, double y, double z) {
}
Point getPoint() {
- return this.point;
+ return point;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ OffsetPoint that = (OffsetPoint) o;
+ return point.equals(that.point);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(point);
}
}