1 package com.irtimaled.bbor.common.models;
3 import com.irtimaled.bbor.common.MathHelper;
4 import net.minecraft.util.math.BlockPos;
11 public Coords(int x, int y, int z) {
17 public Coords(double x, double y, double z) {
18 this.x = MathHelper.floor(x);
19 this.y = MathHelper.floor(y);
20 this.z = MathHelper.floor(z);
23 public Coords(BlockPos blockPos) {
24 this(blockPos.getX(), blockPos.getY(), blockPos.getZ());
40 public boolean equals(Object other) {
45 if (!(other instanceof Coords)) {
49 Coords coords = (Coords)other;
50 return this.getX() == coords.getX() &&
51 this.getY() == coords.getY() &&
52 this.getZ() == coords.getZ();
56 public int hashCode() {
57 return (this.getY() + this.getZ() * 31) * 31 + this.getX();