1 package com.irtimaled.bbor.common.models;
3 import com.irtimaled.bbor.common.MathHelper;
4 import com.irtimaled.bbor.common.TypeHelper;
5 import net.minecraft.util.math.BlockPos;
12 public Coords(int x, int y, int z) {
18 public Coords(double x, double y, double z) {
19 this.x = MathHelper.floor(x);
20 this.y = MathHelper.floor(y);
21 this.z = MathHelper.floor(z);
24 public Coords(BlockPos blockPos) {
25 this(blockPos.getX(), blockPos.getY(), blockPos.getZ());
41 public int hashCode() {
42 return TypeHelper.combineHashCodes(z, y, x);
46 public boolean equals(Object obj) {
47 if (this == obj) return true;
48 if (obj == null || getClass() != obj.getClass()) return false;
49 Coords other = (Coords) obj;
50 return getX() == other.getX() &&
51 getY() == other.getY() &&
52 getZ() == other.getZ();